Klasse ReferenceBinding

Bekannte direkte Unterklassen:
IntersectionTypeBinding18, ParameterizedTypeBinding, ProblemReferenceBinding, SourceTypeBinding, TypeVariableBinding, UnresolvedReferenceBinding, WildcardBinding

public abstract class ReferenceBinding extends TypeBinding
  • Felddetails

    • compoundName

      public char[][] compoundName
    • sourceName

      public char[] sourceName
    • modifiers

      public int modifiers
    • fPackage

      public PackageBinding fPackage
    • singleAbstractMethod

      protected MethodBinding[] singleAbstractMethod
    • LUB_GENERIC

      public static final ReferenceBinding LUB_GENERIC
    • samProblemBinding

      protected static ProblemMethodBinding samProblemBinding
  • Konstruktordetails

    • ReferenceBinding

      public ReferenceBinding(ReferenceBinding prototype)
    • ReferenceBinding

      public ReferenceBinding()
  • Methodendetails

    • getRecordComponentAccessor

      public MethodBinding getRecordComponentAccessor(char[] name)
      Get the accessor method given the record component name
      Parameter:
      name - name of the record component
      Gibt zurück:
      the method binding of the accessor if found, else null
    • binarySearch

      public static FieldBinding binarySearch(char[] name, FieldBinding[] sortedFields)
    • binarySearch

      public static long binarySearch(char[] selector, MethodBinding[] sortedMethods)
      Returns a combined range value representing: (start + (endUngültige Eingabe: "<"Ungültige Eingabe: "<"32)), where start is the index of the first matching method (remember methods are sorted alphabetically on selectors), and end is the index of last contiguous methods with same selector. -1 means no method got found
      Parameter:
      selector -
      sortedMethods -
      Gibt zurück:
      (start + (endUngültige Eingabe: "<"Ungültige Eingabe: "<"32)) or -1 if no method found
    • sortFields

      public static void sortFields(FieldBinding[] sortedFields, int left, int right)
      Sort the field array using a quicksort
    • sortMethods

      public static void sortMethods(MethodBinding[] sortedMethods, int left, int right)
      Sort the field array using a quicksort
    • availableFields

      public FieldBinding[] availableFields()
      Return the array of resolvable fields (resilience)
    • availableMethods

      public MethodBinding[] availableMethods()
      Return the array of resolvable methods (resilience)
    • hasHierarchyCheckStarted

      public boolean hasHierarchyCheckStarted()
    • setHierarchyCheckDone

      public void setHierarchyCheckDone()
    • isFieldInitializationFinished

      protected boolean isFieldInitializationFinished()
      Gibt zurück:
      true, if the fields of the binding are fully initialized.
    • canBeInstantiated

      public boolean canBeInstantiated()
      Answer true if the receiver can be instantiated
      Setzt außer Kraft:
      canBeInstantiated in Klasse TypeBinding
    • canBeSeenBy

      public boolean canBeSeenBy(PackageBinding invocationPackage)
      Answer true if the receiver is visible to the invocationPackage.
    • canBeSeenBy

      public boolean canBeSeenBy(ReferenceBinding receiverType, ReferenceBinding invocationType)
      Answer true if the receiver is visible to the receiverType and the invocationType.
    • innerCanBeSeenBy

      public final boolean innerCanBeSeenBy(ReferenceBinding receiverType, ReferenceBinding invocationType)
    • canBeSeenBy

      public boolean canBeSeenBy(Scope scope)
      Answer true if the receiver is visible to the type provided by the scope.
      Setzt außer Kraft:
      canBeSeenBy in Klasse TypeBinding
    • innerCanBeSeenBy

      public final boolean innerCanBeSeenBy(Scope scope)
    • computeGenericTypeSignature

      public char[] computeGenericTypeSignature(TypeVariableBinding[] typeVariables)
    • computeId

      public void computeId()
    • computeId

      public void computeId(LookupEnvironment environment)
    • computeUniqueKey

      public char[] computeUniqueKey(boolean isLeaf)
      p.XUngültige Eingabe: "<"T extends Y Ungültige Eingabe: "&" I, U extends Y> {} -> Lp/XUngültige Eingabe: "<"TT;TU;>;
      Setzt außer Kraft:
      computeUniqueKey in Klasse Binding
    • constantPoolName

      public char[] constantPoolName()
      Answer the receiver's constant pool name. NOTE: This method should only be used during/after code gen.
      Angegeben von:
      constantPoolName in Klasse TypeBinding
    • debugName

      public String debugName()
      Setzt außer Kraft:
      debugName in Klasse TypeBinding
    • depth

      public int depth()
      Setzt außer Kraft:
      depth in Klasse TypeBinding
    • detectAnnotationCycle

      public boolean detectAnnotationCycle()
    • enclosingTypeAt

      public final ReferenceBinding enclosingTypeAt(int relativeDepth)
    • enumConstantCount

      public int enumConstantCount()
    • fieldCount

      public int fieldCount()
    • fields

      public FieldBinding[] fields()
    • getAccessFlags

      public final int getAccessFlags()
    • getAnnotations

      public AnnotationBinding[] getAnnotations()
      Setzt außer Kraft:
      getAnnotations in Klasse Binding
      Gibt zurück:
      the JSR 175 annotations for this type.
    • getAnnotationTagBits

      public long getAnnotationTagBits()
      Beschreibung aus Klasse kopiert: Binding
      Compute the tagbits for standard annotations. For source types, these could require lazily resolving corresponding annotation nodes, in case of forward references. For type use bindings, this method still returns the tagbits corresponding to the type declaration binding.
      Setzt außer Kraft:
      getAnnotationTagBits in Klasse Binding
      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.internal.compiler.lookup.Binding#getAnnotationTagBits()
    • getEnclosingInstancesSlotSize

      public int getEnclosingInstancesSlotSize()
      Gibt zurück:
      the enclosingInstancesSlotSize
    • getExactConstructor

      public MethodBinding getExactConstructor(TypeBinding[] argumentTypes)
    • getExactMethod

      public MethodBinding getExactMethod(char[] selector, TypeBinding[] argumentTypes, CompilationUnitScope refScope)
    • getField

      public FieldBinding getField(char[] fieldName, boolean needResolve)
    • getComponent

      public RecordComponentBinding getComponent(char[] componentName, boolean needResolve)
    • getRecordComponent

      public RecordComponentBinding getRecordComponent(char[] name)
    • getField

      public FieldBinding getField(char[] fieldName, boolean resolve, InvocationSite site, Scope scope)
      Where multiple fields with the same name are defined, this will return the one most visible one... Added for AspectJ to allow proper lookup with inter-type fields
    • getFileName

      public char[] getFileName()
      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.internal.compiler.env.IDependent#getFileName()
    • getMemberType

      public ReferenceBinding getMemberType(char[] typeName)
      Find the member type with the given simple typeName. Benefits from the fact that the array of memberTypes() is sorted.
    • getMethods

      public MethodBinding[] getMethods(char[] selector)
      Setzt außer Kraft:
      getMethods in Klasse TypeBinding
    • getMethods

      public MethodBinding[] getMethods(char[] selector, int suggestedParameterLength)
    • getOuterLocalVariablesSlotSize

      public int getOuterLocalVariablesSlotSize()
      Gibt zurück:
      the outerLocalVariablesSlotSize
    • getPackage

      public PackageBinding getPackage()
      Angegeben von:
      getPackage in Klasse TypeBinding
    • getTypeVariable

      public TypeVariableBinding getTypeVariable(char[] variableName)
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Object
    • hasIncompatibleSuperType

      public boolean hasIncompatibleSuperType(ReferenceBinding otherType)
      Returns true if the two types have an incompatible common supertype, e.g. List and List
    • hasMemberTypes

      public boolean hasMemberTypes()
    • acceptsNonNullDefault

      public boolean acceptsNonNullDefault()
      Beschreibung aus Klasse kopiert: TypeBinding
      Used to implement this sentence from o.e.j.annotation.DefaultLocation: "Wildcards and the use of type variables are always excluded from NonNullByDefault."
      Setzt außer Kraft:
      acceptsNonNullDefault in Klasse TypeBinding
    • hasRestrictedAccess

      public final boolean hasRestrictedAccess()
    • hasNullBit

      public boolean hasNullBit(int mask)
      Query typeBits without triggering supertype lookup.
    • implementsInterface

      public boolean implementsInterface(ReferenceBinding anInterface, boolean searchHierarchy)
      Answer true if the receiver implements anInterface or is identical to anInterface. If searchHierarchy is true, then also search the receiver's superclasses. NOTE: Assume that anInterface is an interface.
    • isAbstract

      public final boolean isAbstract()
      Answer true if the receiver is an abstract type
    • isAnnotationType

      public boolean isAnnotationType()
      Setzt außer Kraft:
      isAnnotationType in Klasse Binding
    • isBinaryBinding

      public final boolean isBinaryBinding()
    • isClass

      public boolean isClass()
      Setzt außer Kraft:
      isClass in Klasse TypeBinding
    • isNestmateOf

      public boolean isNestmateOf(ReferenceBinding other)
    • isProperType

      public boolean isProperType(boolean admitCapture18)
      Beschreibung aus Klasse kopiert: TypeBinding
      JLS8 Sect 18.1.1
      Setzt außer Kraft:
      isProperType in Klasse TypeBinding
      Parameter:
      admitCapture18 - request if CaptureBinding18 shuld be considered as a proper type. If unsure say 'true', only in Scope.greaterLowerBound(TypeBinding[], Scope, LookupEnvironment) CaptureBinding18 has to be excluded to prevent an NPE on a branch that heuristically tries to avoid inconsistent intersections.
    • isCompatibleWith

      public boolean isCompatibleWith(TypeBinding otherType, Scope captureScope)
      Answer true if the receiver type can be assigned to the argument type (right) In addition to improving performance, caching also ensures there is no infinite regression since per nature, the compatibility check is recursive through parameterized type arguments (122775)
      Angegeben von:
      isCompatibleWith in Klasse TypeBinding
    • isNonSealed

      public final boolean isNonSealed()
      Answer true if the receiver has non-sealed modifier
    • isSealed

      public boolean isSealed()
      Answer true if the receiver has sealed modifier
    • isSubtypeOf

      public boolean isSubtypeOf(TypeBinding other, boolean simulatingBugJDK8026527)
      Setzt außer Kraft:
      isSubtypeOf in Klasse TypeBinding
    • isSubTypeOfRTL

      protected boolean isSubTypeOfRTL(TypeBinding other)
    • isDefault

      public final boolean isDefault()
      Answer true if the receiver has default visibility
    • isDeprecated

      public final boolean isDeprecated()
      Answer true if the receiver is a deprecated type
    • isEnum

      public boolean isEnum()
      Setzt außer Kraft:
      isEnum in Klasse TypeBinding
    • isFinal

      public final boolean isFinal()
      Answer true if the receiver is final and cannot be subclassed
    • isHierarchyBeingConnected

      public boolean isHierarchyBeingConnected()
      Returns true if the type hierarchy is being connected
    • isHierarchyBeingActivelyConnected

      public boolean isHierarchyBeingActivelyConnected()
      Returns true if the type hierarchy is being connected "actively" i.e not paused momentatrily, while resolving type arguments. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=294057
    • isHierarchyConnected

      public boolean isHierarchyConnected()
      Returns true if the type hierarchy is connected
    • isInterface

      public boolean isInterface()
      Setzt außer Kraft:
      isInterface in Klasse TypeBinding
    • isFunctionalInterface

      public boolean isFunctionalInterface(Scope scope)
      Setzt außer Kraft:
      isFunctionalInterface in Klasse TypeBinding
    • isPrivate

      public final boolean isPrivate()
      Answer true if the receiver has private visibility
    • isOrEnclosedByPrivateType

      public final boolean isOrEnclosedByPrivateType()
      Answer true if the receiver or any of its enclosing types have private visibility
    • isProtected

      public final boolean isProtected()
      Answer true if the receiver has protected visibility
    • isPublic

      public final boolean isPublic()
      Answer true if the receiver has public visibility
    • isStatic

      public final boolean isStatic()
      Answer true if the receiver is a static member type (or toplevel)
      Setzt außer Kraft:
      isStatic in Klasse TypeBinding
    • isStrictfp

      public final boolean isStrictfp()
      Answer true if all float operations must adher to IEEE 754 float/double rules
    • isSuperclassOf

      public boolean isSuperclassOf(ReferenceBinding otherType)
      Answer true if the receiver is in the superclass hierarchy of aType NOTE: Object.isSuperclassOf(Object) -> false
    • isThrowable

      public boolean isThrowable()
      Beschreibung aus Klasse kopiert: TypeBinding
      Returns true if a given type may be thrown
      Setzt außer Kraft:
      isThrowable in Klasse TypeBinding
      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.internal.compiler.lookup.TypeBinding#isThrowable()
    • isUncheckedException

      public boolean isUncheckedException(boolean includeSupertype)
      JLS 11.5 ensures that Throwable, Exception, RuntimeException and Error are directly connected. (ThrowableUngültige Eingabe: "<"- Exception Ungültige Eingabe: "<"- RumtimeException, Throwable Ungültige Eingabe: "<"- Error). Thus no need to check #isCompatibleWith but rather check in type IDs so as to avoid some eager class loading for JCL writers. When 'includeSupertype' is true, answers true if the given type can be a supertype of some unchecked exception type (i.e. Throwable or Exception).
      Setzt außer Kraft:
      isUncheckedException in Klasse TypeBinding
      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.internal.compiler.lookup.TypeBinding#isUncheckedException(boolean)
    • isUsed

      public final boolean isUsed()
      Answer true if the receiver has private visibility and is used locally
    • isViewedAsDeprecated

      public final boolean isViewedAsDeprecated()
      Answer true if the receiver is deprecated (or any of its enclosing types)
    • memberTypes

      public ReferenceBinding[] memberTypes()
      Returns the member types of this type sorted by simple name.
    • methods

      public MethodBinding[] methods()
    • outermostEnclosingType

      public final ReferenceBinding outermostEnclosingType()
    • qualifiedSourceName

      public char[] qualifiedSourceName()
      Answer the source name for the type. In the case of member types, as the qualified name from its top level type. For example, for a member type N defined inside M Ungültige Eingabe: "&" A: "A.M.N".
      Angegeben von:
      qualifiedSourceName in Klasse TypeBinding
    • readableName

      public char[] readableName()
      Answer the receiver's signature. NOTE: This method should only be used during/after code gen.
      Angegeben von:
      readableName in Klasse Binding
    • readableName

      public char[] readableName(boolean showGenerics)
    • appendNullAnnotation

      protected void appendNullAnnotation(StringBuffer nameBuffer, CompilerOptions options)
    • retrieveAnnotationHolder

      public AnnotationHolder retrieveAnnotationHolder(Binding binding, boolean forceInitialization)
    • setAnnotations

      public void setAnnotations(AnnotationBinding[] annotations, boolean forceStore)
      Setzt außer Kraft:
      setAnnotations in Klasse Binding
    • setContainerAnnotationType

      public void setContainerAnnotationType(ReferenceBinding value)
    • tagAsHavingDefectiveContainerType

      public void tagAsHavingDefectiveContainerType()
    • nullAnnotatedReadableName

      public char[] nullAnnotatedReadableName(CompilerOptions options, boolean shortNames)
      Beschreibung aus Klasse kopiert: TypeBinding
      Answer a readable name (for error reporting) that includes nullness type annotations.
      Setzt außer Kraft:
      nullAnnotatedReadableName in Klasse TypeBinding
      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.internal.compiler.lookup.TypeBinding#nullAnnotatedReadableName(CompilerOptions,boolean)
    • shortReadableName

      public char[] shortReadableName()
      Setzt außer Kraft:
      shortReadableName in Klasse Binding
    • shortReadableName

      public char[] shortReadableName(boolean showGenerics)
    • signature

      public char[] signature()
      Beschreibung aus Klasse kopiert: TypeBinding
      Answer the receiver classfile signature. Arrays Ungültige Eingabe: "&" base types do not distinguish between signature() Ungültige Eingabe: "&" constantPoolName(). NOTE: This method should only be used during/after code gen.
      Setzt außer Kraft:
      signature in Klasse TypeBinding
    • sourceName

      public char[] sourceName()
      Angegeben von:
      sourceName in Klasse TypeBinding
    • upwardsProjection

      public ReferenceBinding upwardsProjection(Scope scope, TypeBinding[] mentionedTypeVariables)
      Perform an upwards type projection as per JLS 4.10.5
      Setzt außer Kraft:
      upwardsProjection in Klasse TypeBinding
      Parameter:
      scope - Relevant scope for evaluating type projection
      mentionedTypeVariables - Filter for mentioned type variabled
    • downwardsProjection

      public ReferenceBinding downwardsProjection(Scope scope, TypeBinding[] mentionedTypeVariables)
      Perform a downwards type projection as per JLS 4.10.5
      Setzt außer Kraft:
      downwardsProjection in Klasse TypeBinding
      Parameter:
      scope - Relevant scope for evaluating type projection
      mentionedTypeVariables - Filter for mentioned type variabled
    • superclass

      public ReferenceBinding superclass()
      Setzt außer Kraft:
      superclass in Klasse TypeBinding
    • permittedTypes

      public ReferenceBinding[] permittedTypes()
      Setzt außer Kraft:
      permittedTypes in Klasse TypeBinding
    • superInterfaces

      public ReferenceBinding[] superInterfaces()
      Setzt außer Kraft:
      superInterfaces in Klasse TypeBinding
    • syntheticEnclosingInstanceTypes

      public ReferenceBinding[] syntheticEnclosingInstanceTypes()
    • unResolvedFields

      public FieldBinding[] unResolvedFields()
    • unResolvedComponents

      public RecordComponentBinding[] unResolvedComponents()
    • applyCloseableClassWhitelists

      protected int applyCloseableClassWhitelists(CompilerOptions options)
    • hasMethodWithNumArgs

      protected boolean hasMethodWithNumArgs(char[] selector, int numArgs)
    • applyCloseableInterfaceWhitelists

      protected int applyCloseableInterfaceWhitelists()
    • getInterfaceAbstractContracts

      protected MethodBinding[] getInterfaceAbstractContracts(Scope scope, boolean replaceWildcards, boolean filterDefaultMethods) throws InvalidInputException
      Löst aus:
      InvalidInputException
    • getSingleAbstractMethod

      public MethodBinding getSingleAbstractMethod(Scope scope, boolean replaceWildcards)
      Beschreibung aus Klasse kopiert: TypeBinding
      Return the single abstract method of a functional interface, or one of null or samProblemBinding, if the receiver is not a functional interface as defined in JLS 9.8. In particular null is answered if the receiver is not a reference type, or is a problem type.
      Setzt außer Kraft:
      getSingleAbstractMethod in Klasse TypeBinding
      Parameter:
      scope - scope
      replaceWildcards - Should wildcards be replaced following JLS 9.8? Say false for lambdas with explicit argument types which should apply 18.5.3
      Gibt zurück:
      The single abstract method of a functional interface, or one of null or samProblemBinding, if the receiver is not a functional interface.
    • isConsistentIntersection

      public static boolean isConsistentIntersection(TypeBinding[] intersectingTypes)
    • module

      public ModuleBinding module()
    • hasEnclosingInstanceContext

      public boolean hasEnclosingInstanceContext()