Class ThisExpression

  • All Implemented Interfaces:
    java.lang.Cloneable, Constants, RuntimeConstants
    Direct Known Subclasses:
    SuperExpression

    public class ThisExpression
    extends Expression
    WARNING: The contents of this source file are not part of any supported API. Code that depends on them does so at its own risk: they are subject to change or removal without notice.
    • Constructor Detail

      • ThisExpression

        public ThisExpression​(long where)
        Constructor
      • ThisExpression

        protected ThisExpression​(int op,
                                 long where)
      • ThisExpression

        public ThisExpression​(long where,
                              LocalMember field)
      • ThisExpression

        public ThisExpression​(long where,
                              Context ctx)
      • ThisExpression

        public ThisExpression​(long where,
                              Expression outerArg)
        Constructor for "x.this()"
    • Method Detail

      • getImplementation

        public Expression getImplementation()
        Description copied from class: Expression
        Type checking may assign a more complex implementation to an innocuous-looking expression (like an identifier). Return that implementation, or the original expression itself if there is no special implementation.

        This appears at present to be dead code, and is not called from within javac. Access to the implementation generally occurs within the same class, and thus uses the underlying field directly.

        Overrides:
        getImplementation in class Expression
      • getOuterArg

        public Expression getOuterArg()
        From the 'this' in an expression of the form outer.this(...), or the 'super' in an expression of the form outer.super(...), return the "outer" expression, or null if there is none.
      • isNonNull

        public boolean isNonNull()
        Description copied from class: Expression
        Check if the expression cannot be a null reference.
        Overrides:
        isNonNull in class Expression
      • getAssigner

        public FieldUpdater getAssigner​(Environment env,
                                        Context ctx)
        Description copied from class: Expression
        Return a FieldUpdater object to be used in updating the value of the location denoted by this, which must be an expression suitable for the left-hand side of an assignment. This is used for implementing assignments to private fields for which an access method is required. Returns null if no access method is needed, in which case the assignment is handled in the usual way, by direct access. Only simple assignment expressions are handled here Assignment operators and pre/post increment/decrement operators are are handled by 'getUpdater' below.

        Called during the checking phase.

        Overrides:
        getAssigner in class Expression
      • getUpdater

        public FieldUpdater getUpdater​(Environment env,
                                       Context ctx)
        Description copied from class: Expression
        Return a FieldUpdater object to be used in updating the value of the location denoted by this, which must be an expression suitable for the left-hand side of an assignment. This is used for implementing the assignment operators and the increment/decrement operators on private fields that require an access method, e.g., uplevel from an inner class. Returns null if no access method is needed.

        Called during the checking phase.

        Overrides:
        getUpdater in class Expression
      • print

        public void print​(java.io.PrintStream out)
        Print
        Overrides:
        print in class Expression