Class ThisExpr

All Implemented Interfaces:
NodeWithRange<Node>, NodeWithTokenRange<Node>, Observable, Visitable, HasParentNode<Node>, Resolvable<ResolvedTypeDeclaration>, Cloneable

public class ThisExpr extends Expression implements Resolvable<ResolvedTypeDeclaration>
An occurrence of the "this" keyword.
World.this.greet() is a MethodCallExpr of method name greet, and scope "World.this" which is a ThisExpr with typeName "World".
this.name is a FieldAccessExpr of field greet, and a ThisExpr as its scope. This ThisExpr has no typeName.
Author:
Julio Vilmar Gesser
See Also:
ExplicitConstructorInvocationStmt, SuperExpr
  • Constructor Details

    • ThisExpr

      public ThisExpr()
    • ThisExpr

      public ThisExpr(Name typeName)
    • ThisExpr

      public ThisExpr(TokenRange tokenRange, Name typeName)
      This constructor is used by the parser and is considered private.
  • Method Details