I'm looking through some code, and I don't quite follow the use of the this
keyword in an extension class. It the code shown below, when the objected is instantiated the this
kw is used, but when it's being modified or referenced (say for comparison) this is not used.
What's going on here? When do you use this
KW when dealing with extension classes?
public class myControllerExtension {
private final Account acct;
// The extension constructor initializes the private member
// variable acct by using the getRecord method from the standard
// controller.
public myControllerExtension(ApexPages.StandardController stdController) {
this.acct = (Account)stdController.getRecord();
acct.OwnerId = UserInfo.getOwnerId();
}