Like Java and JavaScript, Alf uses the keyword this to denote the current instance of the context Class in which the this expression occurs. Unlike Java and JavaScript, however, the Alf specification requires that this be used explicitly in order to access features (Properties, Operations and Receptions) of the context Class. For example, this is used extensively in the activity diagram shown below to access context Properties and to invoke the getCurrentTemp Operation.

Accessing context features using this
The Alf Plugin implements an extension to the Alf language that allows context features to be accessed by name without explicitly using a this prefix. This is similar to what is allowed in Java and JavaScript. For example, the meaning of the Alf code in the above example remains the same if al the this expressions are dropped, as shown below.

Accessing context features without using this