Class ArrayBinding


public final class ArrayBinding extends TypeBinding
  • Field Details

    • ArrayLength

      public static final FieldBinding ArrayLength
    • leafComponentType

      public TypeBinding leafComponentType
    • dimensions

      public int dimensions
    • nullTagBitsPerDimension

      public long[] nullTagBitsPerDimension
  • Constructor Details

  • Method Details

    • closestMatch

      public TypeBinding closestMatch()
      Description copied from class: TypeBinding
      In case of problems, returns the closest match found. It may not be perfect match, but the result of a best effort to improve fault-tolerance.
      Overrides:
      closestMatch in class TypeBinding
    • collectMissingTypes

      public List<TypeBinding> collectMissingTypes(List<TypeBinding> missingTypes)
      Description copied from class: TypeBinding
      Iterate through the type components to collect instances of leaf missing types
      Overrides:
      collectMissingTypes in class TypeBinding
      Returns:
      missing types
      See Also:
      • invalid reference
        org.eclipse.jdt.internal.compiler.lookup.TypeBinding#collectMissingTypes(java.util.List)
    • collectSubstitutes

      public void collectSubstitutes(Scope scope, TypeBinding actualType, InferenceContext inferenceContext, int constraint)
      Description copied from class: TypeBinding
      Collect the substitutes into a map for certain type variables inside the receiver type e.g.
      
       Collection<T>.findSubstitute(T, Collection<List<X>>):   T --> List<X>
      
       Constraints:
         A << F   corresponds to:   F.collectSubstitutes(..., A, ..., CONSTRAINT_EXTENDS (1))
         A = F    corresponds to:   F.collectSubstitutes(..., A, ..., CONSTRAINT_EQUAL (0))
         A >> F   corresponds to:   F.collectSubstitutes(..., A, ..., CONSTRAINT_SUPER (2))
       
      Overrides:
      collectSubstitutes in class TypeBinding
    • mentionsAny

      public boolean mentionsAny(TypeBinding[] parameters, int idx)
      Description copied from class: TypeBinding
      Does this type mention any of the given type parameters, except the one at position 'idx'?
      Overrides:
      mentionsAny in class TypeBinding
    • computeUniqueKey

      public char[] computeUniqueKey(boolean isLeaf)
      Overrides:
      computeUniqueKey in class Binding
    • constantPoolName

      public char[] constantPoolName()
      Description copied from class: TypeBinding
      Answer the receiver's constant pool name. NOTE: This method should only be used during/after code gen. e.g. 'java/lang/Object'
      Specified by:
      constantPoolName in class TypeBinding
    • debugName

      public String debugName()
      Overrides:
      debugName in class TypeBinding
    • annotatedDebugName

      public String annotatedDebugName()
      Overrides:
      annotatedDebugName in class TypeBinding
    • dimensions

      public int dimensions()
      Overrides:
      dimensions in class TypeBinding
    • elementsType

      public TypeBinding elementsType()
    • erasure

      public TypeBinding erasure()
      Overrides:
      erasure in class TypeBinding
      See Also:
      • invalid reference
        org.eclipse.jdt.internal.compiler.lookup.TypeBinding#erasure()
    • upwardsProjection

      public ArrayBinding upwardsProjection(Scope scope, TypeBinding[] mentionedTypeVariables)
      Description copied from class: TypeBinding
      Perform an upwards type projection as per JLS 4.10.5
      Overrides:
      upwardsProjection in class TypeBinding
      Parameters:
      scope - Relevant scope for evaluating type projection
      mentionedTypeVariables - Filter for mentioned type variables
      Returns:
      Upwards type projection of 'this', or null if upwards projection is undefined
    • downwardsProjection

      public ArrayBinding downwardsProjection(Scope scope, TypeBinding[] mentionedTypeVariables)
      Description copied from class: TypeBinding
      Perform a downwards type projection as per JLS 4.10.5
      Overrides:
      downwardsProjection in class TypeBinding
      Parameters:
      scope - Relevant scope for evaluating type projection
      mentionedTypeVariables - Filter for mentioned type variables
      Returns:
      Downwards type projection of 'this', or null if downwards projection is undefined
    • environment

      public LookupEnvironment environment()
    • genericTypeSignature

      public char[] genericTypeSignature()
      Description copied from class: TypeBinding
      Answer the receiver classfile signature. Arrays and base types do not distinguish between signature() and constantPoolName(). NOTE: This method should only be used during/after code gen.
      Overrides:
      genericTypeSignature in class TypeBinding
    • getPackage

      public PackageBinding getPackage()
      Specified by:
      getPackage in class TypeBinding
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • isCompatibleWith

      public boolean isCompatibleWith(TypeBinding otherType, Scope captureScope)
      Specified by:
      isCompatibleWith in class TypeBinding
    • isSubtypeOf

      public boolean isSubtypeOf(TypeBinding otherType, boolean simulatingBugJDK8026527)
      Overrides:
      isSubtypeOf in class TypeBinding
    • isProperType

      public boolean isProperType(boolean admitCapture18)
      Description copied from class: TypeBinding
      JLS8 Sect 18.1.1
      Overrides:
      isProperType in class TypeBinding
      Parameters:
      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.
    • kind

      public int kind()
      Overrides:
      kind in class TypeBinding
    • leafComponentType

      public TypeBinding leafComponentType()
      Overrides:
      leafComponentType in class TypeBinding
    • nullAnnotatedReadableName

      public char[] nullAnnotatedReadableName(CompilerOptions options, boolean shortNames)
      Description copied from class: TypeBinding
      Answer a readable name (for error reporting) that includes nullness type annotations.
      Overrides:
      nullAnnotatedReadableName in class TypeBinding
    • problemId

      public int problemId()
      Overrides:
      problemId in class Binding
    • qualifiedSourceName

      public char[] qualifiedSourceName()
      Description copied from class: TypeBinding
      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 & A: "A.M.N".
      Specified by:
      qualifiedSourceName in class TypeBinding
    • readableName

      public char[] readableName()
      Specified by:
      readableName in class Binding
    • setTypeAnnotations

      public void setTypeAnnotations(AnnotationBinding[] annotations, boolean evalNullAnnotations)
      Overrides:
      setTypeAnnotations in class TypeBinding
    • shortReadableName

      public char[] shortReadableName()
      Overrides:
      shortReadableName in class Binding
    • sourceName

      public char[] sourceName()
      Specified by:
      sourceName in class TypeBinding
    • swapUnresolved

      public void swapUnresolved(UnresolvedReferenceBinding unresolvedType, ReferenceBinding resolvedType, LookupEnvironment env)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • unannotated

      public TypeBinding unannotated()
      Description copied from class: TypeBinding
      Return this type minus its type annotations
      Overrides:
      unannotated in class TypeBinding
    • withoutToplevelNullAnnotation

      public TypeBinding withoutToplevelNullAnnotation()
      Description copied from class: TypeBinding
      Return this type minus its toplevel null annotations. Any annotations on type arguments or bounds are retained.
      Overrides:
      withoutToplevelNullAnnotation in class TypeBinding
    • uncapture

      public TypeBinding uncapture(Scope scope)
      Description copied from class: TypeBinding
      Perform capture "deconversion" on a given type
      Overrides:
      uncapture in class TypeBinding
    • acceptsNonNullDefault

      public boolean acceptsNonNullDefault()
      Description copied from class: TypeBinding
      Used to implement this sentence from o.e.j.annotation.DefaultLocation: "Wildcards and the use of type variables are always excluded from NonNullByDefault."
      Overrides:
      acceptsNonNullDefault in class TypeBinding
    • updateTagBits

      public long updateTagBits()
      Description copied from class: TypeBinding
      Refresh some tagBits from details into the main type. Currently handled: TagBits.HasNullTypeAnnotation
      Overrides:
      updateTagBits in class TypeBinding
    • getCloneMethod

      public MethodBinding getCloneMethod(MethodBinding originalMethod)
      The type of x.clone() is substituted from 'Object' into the type of the receiver array (non-null)
    • isArrayClone

      public static boolean isArrayClone(TypeBinding receiverType, MethodBinding binding)