org.aspectj.org.eclipse.jdt.internal.compiler.lookup
Class ArrayBinding

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Binding
      extended by org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding
          extended by org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ArrayBinding

public final class ArrayBinding
extends TypeBinding


Field Summary
static FieldBinding ArrayLength
           
 int dimensions
           
 TypeBinding leafComponentType
           
 long[] nullTagBitsPerDimension
           
 
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding
BOOLEAN, BYTE, CHAR, DOUBLE, FLOAT, id, INT, LONG, NULL, SHORT, tagBits, TYPE_USE_BINDING, typeAnnotations, VOID
 
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Binding
ANY_EXCEPTION, ARRAY_TYPE, BASE_TYPE, DefaultLocationArrayContents, DefaultLocationField, DefaultLocationParameter, DefaultLocationReturnType, DefaultLocationTypeArgument, DefaultLocationTypeBound, DefaultLocationTypeParameter, FIELD, GENERIC_TYPE, IMPORT, INTERSECTION_CAST_TYPE, INTERSECTION_TYPE, LOCAL, METHOD, NO_ANNOTATIONS, NO_ELEMENT_VALUE_PAIRS, NO_EXCEPTIONS, NO_FIELDS, NO_MEMBER_TYPES, NO_METHODS, NO_NULL_DEFAULT, NO_PARAMETER_NAMES, NO_PARAMETERS, NO_REFERENCE_TYPES, NO_SUPERINTERFACES, NO_TYPE_VARIABLES, NO_TYPES, NONNULL_BY_DEFAULT, NULL_UNSPECIFIED_BY_DEFAULT, NullnessDefaultMASK, PACKAGE, PARAMETERIZED_TYPE, POLY_TYPE, RAW_TYPE, TYPE, TYPE_PARAMETER, TYPE_USE, UNINITIALIZED_FIELDS, UNINITIALIZED_METHODS, UNINITIALIZED_REFERENCE_TYPES, VARIABLE, WILDCARD_TYPE
 
Constructor Summary
ArrayBinding(TypeBinding type, int dimensions, LookupEnvironment environment)
           
 
Method Summary
 boolean acceptsNonNullDefault()
          Used to implement this sentence from o.e.j.annotation.DefaultLocation: "Wildcards and the use of type variables are always excluded from NonNullByDefault."
 java.lang.String annotatedDebugName()
           
 TypeBinding closestMatch()
          In case of problems, returns the closest match found.
 java.util.List collectMissingTypes(java.util.List missingTypes)
          Iterate through the type components to collect instances of leaf missing types
 void collectSubstitutes(Scope scope, TypeBinding actualType, InferenceContext inferenceContext, int constraint)
          Collect the substitutes into a map for certain type variables inside the receiver type e.g.
 char[] computeUniqueKey(boolean isLeaf)
           
 char[] constantPoolName()
          Answer the receiver's constant pool name.
 java.lang.String debugName()
           
 int dimensions()
           
 TypeBinding elementsType()
           
 LookupEnvironment environment()
           
 TypeBinding erasure()
           
 char[] genericTypeSignature()
          Answer the receiver classfile signature.
 PackageBinding getPackage()
           
 int hashCode()
           
 boolean isCompatibleWith(TypeBinding otherType, Scope captureScope)
           
 boolean isProperType(boolean admitCapture18)
          JLS8 Sect 18.1.1
 boolean isSubtypeOf(TypeBinding otherType)
           
 int kind()
           
 TypeBinding leafComponentType()
           
 boolean mentionsAny(TypeBinding[] parameters, int idx)
          Does this type mention any of the given type parameters, except the one at position 'idx'?
 char[] nullAnnotatedReadableName(CompilerOptions options, boolean shortNames)
          Answer a readable name (for error reporting) that includes nullness type annotations.
 int problemId()
           
 char[] qualifiedSourceName()
          Answer the source name for the type.
 char[] readableName()
           
 void setTypeAnnotations(AnnotationBinding[] annotations, boolean evalNullAnnotations)
           
 char[] shortReadableName()
           
 char[] sourceName()
           
 void swapUnresolved(UnresolvedReferenceBinding unresolvedType, ReferenceBinding resolvedType, LookupEnvironment env)
           
 java.lang.String toString()
           
 TypeBinding unannotated(boolean removeOnlyNullAnnotations)
          Return this type minus its type annotations
 TypeBinding uncapture(Scope scope)
          Perform capture "deconversion" on a given type
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding
actualType, canBeInstantiated, canBeSeenBy, capture, clone, containerAnnotationType, depth, enclosingType, enterRecursiveFunction, equalsEquals, exitRecursiveFunction, findSuperTypeOriginatingFrom, findSuperTypeOriginatingFrom, genericCast, getErasureCompatibleType, getIntersectingTypes, getMethods, getSingleAbstractMethod, getTypeAnnotations, hasNullTypeAnnotations, hasTypeAnnotations, hasTypeBit, isAnonymousType, isArrayType, isBaseType, isBoundParameterizedType, isBoxedPrimitiveType, isCapture, isClass, isCompatibleWith, isEnum, isEquivalentTo, isFunctionalInterface, isGenericType, isHierarchyInconsistent, isInterface, isIntersectionCastType, isIntersectionType, isLocalType, isMemberType, isNestedType, isNumericType, isParameterizedType, isParameterizedTypeWithActualArguments, isParameterizedWithOwnVariables, isPrimitiveOrBoxedPrimitiveType, isPrimitiveType, isProvablyDistinct, isRawType, isReifiable, isRepeatableAnnotationType, isStatic, isThrowable, isTypeArgumentContainedBy, isTypeVariable, isUnboundWildcard, isUncheckedException, isUnresolvedType, isWildcard, needsUncheckedConversion, notEquals, original, prototype, qualifiedPackageName, signature, sIsMoreSpecific, superclass, superInterfaces, syntheticOuterLocalVariables, typeVariables, wellKnownType
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Binding
computeUniqueKey, getAnnotations, getAnnotationTagBits, initializeDeprecatedAnnotationTagBits, isAnnotationType, isParameter, isTaggedRepeatable, isValidBinding, isVolatile, setAnnotations, setAnnotations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ArrayLength

public static final FieldBinding ArrayLength

leafComponentType

public TypeBinding leafComponentType

dimensions

public int dimensions

nullTagBitsPerDimension

public long[] nullTagBitsPerDimension
Constructor Detail

ArrayBinding

public ArrayBinding(TypeBinding type,
                    int dimensions,
                    LookupEnvironment environment)
Method Detail

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 java.util.List collectMissingTypes(java.util.List 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:
TypeBinding.collectMissingTypes(java.util.List)

collectSubstitutes

public void collectSubstitutes(Scope scope,
                               TypeBinding actualType,
                               InferenceContext inferenceContext,
                               int constraint)
Collect the substitutes into a map for certain type variables inside the receiver type e.g. Collection.collectSubstitutes(Collection>, Map), will populate Map with: T --> List 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()
Answer the receiver's constant pool name. NOTE: This method should only be used during/after code gen. e.g. '[Ljava/lang/Object;'

Specified by:
constantPoolName in class TypeBinding

debugName

public java.lang.String debugName()
Overrides:
debugName in class TypeBinding

annotatedDebugName

public java.lang.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:
TypeBinding.erasure()

environment

public LookupEnvironment environment()

genericTypeSignature

public char[] genericTypeSignature()
Description copied from class: TypeBinding
Answer the receiver classfile signature. Arrays & base types do not distinguish between signature() & 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 java.lang.Object

isCompatibleWith

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

isSubtypeOf

public boolean isSubtypeOf(TypeBinding otherType)
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()
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)
Overrides:
swapUnresolved in class TypeBinding

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

unannotated

public TypeBinding unannotated(boolean removeOnlyNullAnnotations)
Description copied from class: TypeBinding
Return this type minus its type annotations

Overrides:
unannotated in class TypeBinding
Parameters:
removeOnlyNullAnnotations - if true only null type annotations are removed, otherwise all type annotations.

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