Class NameReference

All Implemented Interfaces:
InvocationSite, TypeConstants, TypeIds
Direct Known Subclasses:
QualifiedNameReference, SingleNameReference

public abstract class NameReference extends Reference implements InvocationSite
  • Field Details

    • binding

      public Binding binding
    • actualReceiverType

      public TypeBinding actualReceiverType
  • Constructor Details

    • NameReference

      public NameReference()
  • Method Details

    • emitDeclaringClassOfConstant

      public void emitDeclaringClassOfConstant(CodeStream codeStream)
      Creates a constant pool entry which is not needed by the VM but might help tools. See https://bugs.openjdk.org/browse/JDK-7153958
    • emitDeclaringClassOfConstant

      public static void emitDeclaringClassOfConstant(Expression expr, CodeStream codeStream)
      Creates a constant pool entry for each constant reference within expr. This is not needed by the VM but might help tools. See https://bugs.openjdk.org/browse/JDK-7153958
    • fieldBinding

      public FieldBinding fieldBinding()
      Use this method only when sure that the current reference is not a chain of several fields (QualifiedNameReference with more than one field). Otherwise use lastFieldBinding().
      Overrides:
      fieldBinding in class Reference
    • lastFieldBinding

      public FieldBinding lastFieldBinding()
      Overrides:
      lastFieldBinding in class Reference
    • freshInferenceContext

      public InferenceContext18 freshInferenceContext(Scope scope)
      Description copied from interface: InvocationSite
      When inference for this invocationSite starts, get a fresh inference context, initialized from this site.
      Specified by:
      freshInferenceContext in interface InvocationSite
    • isSuperAccess

      public boolean isSuperAccess()
      Specified by:
      isSuperAccess in interface InvocationSite
    • isTypeAccess

      public boolean isTypeAccess()
      Specified by:
      isTypeAccess in interface InvocationSite
    • isTypeReference

      public boolean isTypeReference()
      Overrides:
      isTypeReference in class Expression
    • setActualReceiverType

      public void setActualReceiverType(ReferenceBinding receiverType)
      Specified by:
      setActualReceiverType in interface InvocationSite
    • setDepth

      public void setDepth(int depth)
      Specified by:
      setDepth in interface InvocationSite
    • setFieldIndex

      public void setFieldIndex(int index)
      Specified by:
      setFieldIndex in interface InvocationSite
    • unboundReferenceErrorName

      public abstract String unboundReferenceErrorName()
    • getName

      public abstract char[][] getName()
    • isType

      public boolean isType()
      Description copied from class: ASTNode
      Returns whether this node represents a binding of type Binding.TYPE
      Overrides:
      isType in class ASTNode
      Returns:
      true if the node represents a Binding.TYPE binding type.