Klasse QualifiedNameReference

Alle implementierten Schnittstellen:
InvocationSite, TypeConstants, TypeIds
Bekannte direkte Unterklassen:
CodeSnippetQualifiedNameReference, CompletionOnQualifiedNameReference, KnownFieldReference, SelectionOnQualifiedNameReference

public class QualifiedNameReference extends NameReference
  • Felddetails

    • tokens

      public char[][] tokens
    • sourcePositions

      public long[] sourcePositions
    • otherBindings

      public FieldBinding[] otherBindings
    • indexOfFirstFieldBinding

      public int indexOfFirstFieldBinding
    • syntheticWriteAccessor

      public SyntheticMethodBinding syntheticWriteAccessor
    • syntheticReadAccessors

      public SyntheticMethodBinding[] syntheticReadAccessors
    • genericCast

      public TypeBinding genericCast
    • otherGenericCasts

      public TypeBinding[] otherGenericCasts
  • Konstruktordetails

    • QualifiedNameReference

      public QualifiedNameReference(char[][] tokens, long[] positions, int sourceStart, int sourceEnd)
  • Methodendetails

    • analyseAssignment

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

      public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo)
      Setzt außer Kraft:
      analyseCode in Klasse Reference
    • analyseCode

      public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, boolean valueRequired)
      Beschreibung aus Klasse kopiert: Expression
      More sophisticated for of the flow analysis used for analyzing expressions, and be able to optimize out portions of expressions where no actual value is required.
      Setzt außer Kraft:
      analyseCode in Klasse Expression
      Parameter:
      currentScope -
      flowContext -
      flowInfo -
      valueRequired -
      Gibt zurück:
      The state of initialization after the analysis of the current expression
    • 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?
    • computeConversion

      public void computeConversion(Scope scope, TypeBinding runtimeTimeType, TypeBinding compileTimeType)
      Beschreibung aus Klasse kopiert: Expression
      Base types need that the widening is explicitly done by the compiler using some bytecode like i2f. Also check unsafe type operations.
      Setzt außer Kraft:
      computeConversion in Klasse Expression
      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.internal.compiler.ast.Expression#computeConversion(org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Scope, org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding, org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding)
    • 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
    • generateReadSequence

      public FieldBinding generateReadSequence(BlockScope currentScope, CodeStream codeStream)
    • generateReceiver

      public void generateReceiver(CodeStream codeStream)
    • genericTypeArguments

      public TypeBinding[] genericTypeArguments()
      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.internal.compiler.lookup.InvocationSite#genericTypeArguments()
    • getCodegenBinding

      protected FieldBinding getCodegenBinding(int index)
    • getFinalReceiverType

      protected TypeBinding getFinalReceiverType()
      Returns the receiver type for the final field in sequence (i.e. the return type of the previous binding)
      Gibt zurück:
      receiver type for the final field in sequence
    • getGenericCast

      protected TypeBinding getGenericCast(int index)
    • getOtherFieldBindings

      public TypeBinding getOtherFieldBindings(BlockScope scope)
    • isEquivalent

      public boolean isEquivalent(Reference reference)
      Beschreibung aus Klasse kopiert: Reference
      Is the given reference equivalent to the receiver, meaning that both denote the same path of field reads? Used from FlowContext.isNullcheckedFieldAccess(Reference).
      Setzt außer Kraft:
      isEquivalent in Klasse Reference
    • isFieldAccess

      public boolean isFieldAccess()
    • lastFieldBinding

      public FieldBinding lastFieldBinding()
      Setzt außer Kraft:
      lastFieldBinding in Klasse NameReference
    • manageEnclosingInstanceAccessIfNecessary

      public void manageEnclosingInstanceAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo)
    • manageSyntheticAccessIfNecessary

      public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FieldBinding fieldBinding, int index, FlowInfo flowInfo)
      index is Ungültige Eingabe: "<"0 to denote write access emulation
    • optimizedBooleanConstant

      public Constant optimizedBooleanConstant()
      Beschreibung aus Klasse kopiert: Expression
      Constant usable for bytecode pattern optimizations, but cannot be inlined since it is not strictly equivalent to the definition of constant expressions. In particular, some side-effects may be required to occur (only the end value is known).
      Setzt außer Kraft:
      optimizedBooleanConstant in Klasse Expression
      Gibt zurück:
      Constant known to be of boolean type
    • postConversionType

      public TypeBinding postConversionType(Scope scope)
      Beschreibung aus Klasse kopiert: Expression
      Returns the type of the expression after required implicit conversions. When expression type gets promoted or inserted a generic cast, the converted type will differ from the resolved type (surface side-effects from #computeConversion(...)).
      Setzt außer Kraft:
      postConversionType in Klasse Expression
      Gibt zurück:
      the type after implicit conversion
      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.internal.compiler.ast.Expression#postConversionType(Scope)
    • printExpression

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

      public TypeBinding reportError(BlockScope scope)
      Normal field binding did not work, try to bind to a field of the delegate receiver.
    • 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
    • setFieldIndex

      public void setFieldIndex(int index)
      Angegeben von:
      setFieldIndex in Schnittstelle InvocationSite
      Setzt außer Kraft:
      setFieldIndex in Klasse NameReference
    • setGenericCast

      protected void setGenericCast(int index, TypeBinding someGenericCast)
    • setSyntheticAccessor

      protected void setSyntheticAccessor(FieldBinding fieldBinding, int index, SyntheticMethodBinding syntheticAccessor)
    • traverse

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

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

      public String unboundReferenceErrorName()
      Angegeben von:
      unboundReferenceErrorName in Klasse NameReference
    • getName

      public char[][] getName()
      Angegeben von:
      getName in Klasse NameReference
    • nullAnnotatedVariableBinding

      public VariableBinding nullAnnotatedVariableBinding(boolean supportTypeAnnotations)
      Beschreibung aus Klasse kopiert: Expression
      Used on the lhs of an assignment for detecting null spec violation. If this expression represents a null-annotated variable return the variable binding, otherwise null.
      Setzt außer Kraft:
      nullAnnotatedVariableBinding in Klasse Expression
      Parameter:
      supportTypeAnnotations - if true this causes any variable binding to be used independent of declaration annotations (for in-depth analysis of type annotations)