Alle implementierten Schnittstellen:
TypeConstants, TypeIds
Bekannte direkte Unterklassen:
CodeSnippetThisReference, QualifiedThisReference, SuperReference

public class ThisReference extends Reference
  • Konstruktordetails

    • ThisReference

      public ThisReference(int sourceStart, int sourceEnd)
  • Methodendetails

    • implicitThis

      public static ThisReference implicitThis()
    • analyseAssignment

      public FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, Assignment assignment, boolean isCompound)
      Angegeben von:
      analyseAssignment in Klasse Reference
    • checkAccess

      public boolean checkAccess(BlockScope scope, ReferenceBinding receiverType)
    • checkNPE

      public boolean checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo, int ttlForFieldCheck)
      Beschreibung aus Klasse kopiert: Expression
      Check this expression against potential NPEs, which may occur:
      • if the expression is the receiver in a field access, qualified allocation, array reference or message send incl. implicit message sends like it happens for the collection in a foreach statement.
      • if the expression is subject to unboxing
      • if the expression is the exception in a throw statement
      If a risk of NPE is detected report it to the context. If the expression denotes a local variable, mark it as checked, which affects the flow info.
      Setzt außer Kraft:
      checkNPE in Klasse Reference
      Parameter:
      scope - the scope of the analysis
      flowContext - the current flow context
      flowInfo - the upstream flow info; caveat: may get modified
      ttlForFieldCheck - if this is a reference to a field we will mark that field as nonnull for the specified timeToLive
      Gibt zurück:
      could this expression be checked by the current implementation?
    • generateAssignment

      public void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired)
      Angegeben von:
      generateAssignment in Klasse Reference
    • generateCode

      public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired)
      Beschreibung aus Klasse kopiert: Expression
      Every expression is responsible for generating its implicit conversion when necessary.
      Setzt außer Kraft:
      generateCode in Klasse Expression
      Parameter:
      currentScope - org.eclipse.jdt.internal.compiler.lookup.BlockScope
      codeStream - org.eclipse.jdt.internal.compiler.codegen.CodeStream
      valueRequired - boolean
    • generateCompoundAssignment

      public void generateCompoundAssignment(BlockScope currentScope, CodeStream codeStream, Expression expression, int operator, int assignmentImplicitConversion, boolean valueRequired)
      Angegeben von:
      generateCompoundAssignment in Klasse Reference
    • generatePostIncrement

      public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired)
      Angegeben von:
      generatePostIncrement in Klasse Reference
    • isImplicitThis

      public boolean isImplicitThis()
      Setzt außer Kraft:
      isImplicitThis in Klasse ASTNode
    • isThis

      public boolean isThis()
      Setzt außer Kraft:
      isThis in Klasse ASTNode
    • nullStatus

      public int nullStatus(FlowInfo flowInfo, FlowContext flowContext)
      Setzt außer Kraft:
      nullStatus in Klasse Reference
    • printExpression

      public StringBuffer printExpression(int indent, StringBuffer output)
      Angegeben von:
      printExpression in Klasse Expression
    • resolveType

      public TypeBinding resolveType(BlockScope scope)
      Beschreibung aus Klasse kopiert: Expression
      Resolve the type of this expression in the context of a blockScope
      Setzt außer Kraft:
      resolveType in Klasse Expression
      Parameter:
      scope -
      Gibt zurück:
      Return the actual type of this expression after resolution
    • traverse

      public void traverse(ASTVisitor visitor, BlockScope blockScope)
      Beschreibung aus Klasse kopiert: Expression
      Traverse an expression in the context of a blockScope
      Setzt außer Kraft:
      traverse in Klasse Expression
      Parameter:
      visitor -
      blockScope -
    • traverse

      public void traverse(ASTVisitor visitor, ClassScope blockScope)
      Beschreibung aus Klasse kopiert: Expression
      Traverse an expression in the context of a classScope
      Setzt außer Kraft:
      traverse in Klasse Expression
      Parameter:
      visitor -
      blockScope -