org.eclipse.jdt.internal.compiler.lookup
类 ParameterizedTypeBinding

java.lang.Object
  继承者 org.eclipse.jdt.internal.compiler.lookup.Binding
      继承者 org.eclipse.jdt.internal.compiler.lookup.TypeBinding
          继承者 org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding
              继承者 org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding
所有已实现的接口:
Substitution
直接已知子类:
RawTypeBinding

public class ParameterizedTypeBinding
extends ReferenceBinding
implements Substitution

A parameterized type encapsulates a type with type arguments,


字段摘要
 TypeBinding[] arguments
           
 LookupEnvironment environment
           
 FieldBinding[] fields
           
 char[] genericTypeSignature
           
 ReferenceBinding[] memberTypes
           
 MethodBinding[] methods
           
 ReferenceBinding superclass
           
 ReferenceBinding[] superInterfaces
           
 
从类 org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding 继承的字段
compoundName, fPackage, LUB_GENERIC, modifiers, sourceName
 
从类 org.eclipse.jdt.internal.compiler.lookup.TypeBinding 继承的字段
BOOLEAN, BYTE, CHAR, DOUBLE, FLOAT, id, INT, LONG, NULL, SHORT, tagBits, VOID
 
从类 org.eclipse.jdt.internal.compiler.lookup.Binding 继承的字段
ANY_EXCEPTION, ARRAY_TYPE, BASE_TYPE, FIELD, GENERIC_TYPE, IMPORT, INTERSECTION_TYPE, LOCAL, METHOD, NO_ANNOTATIONS, NO_ELEMENT_VALUE_PAIRS, NO_EXCEPTIONS, NO_FIELDS, NO_MEMBER_TYPES, NO_METHODS, NO_PARAMETERS, NO_SUPERINTERFACES, NO_TYPE_VARIABLES, NO_TYPES, PACKAGE, PARAMETERIZED_TYPE, RAW_TYPE, TYPE, TYPE_PARAMETER, UNINITIALIZED_FIELDS, UNINITIALIZED_METHODS, UNINITIALIZED_REFERENCE_TYPES, VARIABLE, WILDCARD_TYPE
 
构造方法摘要
ParameterizedTypeBinding(ReferenceBinding type, TypeBinding[] arguments, ReferenceBinding enclosingType, LookupEnvironment environment)
           
 
方法摘要
protected  ReferenceBinding actualType()
          May return an UnresolvedReferenceBinding.
 void boundCheck(Scope scope, TypeReference[] argumentReferences)
          Iterate type arguments, and validate them according to corresponding variable bounds.
 boolean canBeInstantiated()
          Answer true if the receiver can be instantiated
 TypeBinding capture(Scope scope, int position)
          Perform capture conversion for a parameterized type with wildcard arguments
 List collectMissingTypes(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.
 void computeId()
           
 char[] computeUniqueKey(boolean isLeaf)
          p.X {} -> Lp/X;
 char[] constantPoolName()
          Answer the receiver's constant pool name.
 ParameterizedMethodBinding createParameterizedMethod(MethodBinding originalMethod)
           
 String debugName()
           
 ReferenceBinding enclosingType()
           
 LookupEnvironment environment()
          Returns the lookup environment
 TypeBinding erasure()
           
 int fieldCount()
           
 FieldBinding[] fields()
           
 ReferenceBinding genericType()
          Return the original generic type from which the parameterized type got instantiated from.
 char[] genericTypeSignature()
          Ltype; LY;
 long getAnnotationTagBits()
          Compute the tagbits for standard annotations.
 int getEnclosingInstancesSlotSize()
           
 MethodBinding getExactConstructor(TypeBinding[] argumentTypes)
           
 MethodBinding getExactMethod(char[] selector, TypeBinding[] argumentTypes, CompilationUnitScope refScope)
           
 FieldBinding getField(char[] fieldName, boolean needResolve)
           
 ReferenceBinding getMemberType(char[] typeName)
           
 MethodBinding[] getMethods(char[] selector)
           
 int getOuterLocalVariablesSlotSize()
           
 boolean hasMemberTypes()
           
 boolean implementsMethod(MethodBinding method)
           
protected  void initializeArguments()
           
 boolean isEquivalentTo(TypeBinding otherType)
          Returns true if a type is identical to another one, or for generic types, true if compared to its raw type.
 boolean isHierarchyConnected()
          Returns true if the type hierarchy is connected
 boolean isRawSubstitution()
          Returns true for raw substitution
 int kind()
           
 ReferenceBinding[] memberTypes()
           
 MethodBinding[] methods()
           
 int problemId()
          Define to be able to get the computeId() for the inner type binding.
 char[] qualifiedPackageName()
          Answer the qualified name of the receiver's package separated by periods or an empty string if its the default package.
 char[] qualifiedSourceName()
          Answer the source name for the type.
 char[] readableName()
          Answer the receiver's signature.
 char[] shortReadableName()
           
 char[] signature()
          Answer the receiver classfile signature.
 char[] sourceName()
           
 TypeBinding substitute(TypeVariableBinding originalVariable)
          Returns the type substitute for a given type variable, or itself if no substitution got performed.
 ReferenceBinding superclass()
           
 ReferenceBinding[] superInterfaces()
           
 void swapUnresolved(UnresolvedReferenceBinding unresolvedType, ReferenceBinding resolvedType, LookupEnvironment env)
           
 ReferenceBinding[] syntheticEnclosingInstanceTypes()
           
 SyntheticArgumentBinding[] syntheticOuterLocalVariables()
           
 String toString()
           
 TypeVariableBinding[] typeVariables()
           
 FieldBinding[] unResolvedFields()
           
 
从类 org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding 继承的方法
availableFields, availableMethods, binarySearch, binarySearch, canBeSeenBy, canBeSeenBy, canBeSeenBy, computeGenericTypeSignature, depth, detectAnnotationCycle, enclosingTypeAt, enumConstantCount, getAccessFlags, getAnnotations, getFileName, getMethods, getPackage, getTypeVariable, hashCode, hasIncompatibleSuperType, hasRestrictedAccess, implementsInterface, isAbstract, isAnnotationType, isBinaryBinding, isClass, isCompatibleWith, isDefault, isDeprecated, isEnum, isFinal, isHierarchyBeingActivelyConnected, isHierarchyBeingConnected, isInterface, isOrEnclosedByPrivateType, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSuperclassOf, isThrowable, isUncheckedException, isUsed, isViewedAsDeprecated, outermostEnclosingType, retrieveAnnotationHolder, setAnnotations, sortFields, sortMethods
 
从类 org.eclipse.jdt.internal.compiler.lookup.TypeBinding 继承的方法
closestMatch, dimensions, findSuperTypeOriginatingFrom, findSuperTypeOriginatingFrom, genericCast, getErasureCompatibleType, isAnonymousType, isArrayType, isBaseType, isBoundParameterizedType, isCapture, isGenericType, isHierarchyInconsistent, isIntersectionType, isLocalType, isMemberType, isNestedType, isNumericType, isParameterizedType, isParameterizedTypeWithActualArguments, isParameterizedWithOwnVariables, isProvablyDistinct, isRawType, isReifiable, isTypeArgumentContainedBy, isTypeVariable, isUnboundWildcard, isWildcard, leafComponentType, needsUncheckedConversion, original, wellKnownType
 
从类 org.eclipse.jdt.internal.compiler.lookup.Binding 继承的方法
computeUniqueKey, initializeDeprecatedAnnotationTagBits, isParameter, isValidBinding, isVolatile
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

字段详细信息

arguments

public TypeBinding[] arguments

environment

public LookupEnvironment environment

genericTypeSignature

public char[] genericTypeSignature

superclass

public ReferenceBinding superclass

superInterfaces

public ReferenceBinding[] superInterfaces

fields

public FieldBinding[] fields

memberTypes

public ReferenceBinding[] memberTypes

methods

public MethodBinding[] methods
构造方法详细信息

ParameterizedTypeBinding

public ParameterizedTypeBinding(ReferenceBinding type,
                                TypeBinding[] arguments,
                                ReferenceBinding enclosingType,
                                LookupEnvironment environment)
方法详细信息

actualType

protected ReferenceBinding actualType()
May return an UnresolvedReferenceBinding.

另请参见:
genericType()

boundCheck

public void boundCheck(Scope scope,
                       TypeReference[] argumentReferences)
Iterate type arguments, and validate them according to corresponding variable bounds.


canBeInstantiated

public boolean canBeInstantiated()
从类 ReferenceBinding 复制的描述
Answer true if the receiver can be instantiated

覆盖:
ReferenceBinding 中的 canBeInstantiated
另请参见:
ReferenceBinding.canBeInstantiated()

capture

public TypeBinding capture(Scope scope,
                           int position)
Perform capture conversion for a parameterized type with wildcard arguments

覆盖:
TypeBinding 中的 capture
另请参见:
TypeBinding.capture(Scope,int)

collectMissingTypes

public List collectMissingTypes(List missingTypes)
从类 TypeBinding 复制的描述
Iterate through the type components to collect instances of leaf missing types

覆盖:
TypeBinding 中的 collectMissingTypes
返回:
missing types
另请参见:
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))

覆盖:
TypeBinding 中的 collectSubstitutes

computeId

public void computeId()
覆盖:
ReferenceBinding 中的 computeId
另请参见:
ReferenceBinding.computeId()

computeUniqueKey

public char[] computeUniqueKey(boolean isLeaf)
从类 ReferenceBinding 复制的描述
p.X {} -> Lp/X;

覆盖:
ReferenceBinding 中的 computeUniqueKey

constantPoolName

public char[] constantPoolName()
从类 ReferenceBinding 复制的描述
Answer the receiver's constant pool name. NOTE: This method should only be used during/after code gen.

覆盖:
ReferenceBinding 中的 constantPoolName
另请参见:
TypeBinding.constantPoolName()

createParameterizedMethod

public ParameterizedMethodBinding createParameterizedMethod(MethodBinding originalMethod)

debugName

public String debugName()
覆盖:
ReferenceBinding 中的 debugName
另请参见:
TypeBinding.debugName()

enclosingType

public ReferenceBinding enclosingType()
覆盖:
TypeBinding 中的 enclosingType
另请参见:
TypeBinding.enclosingType()

environment

public LookupEnvironment environment()
从接口 Substitution 复制的描述
Returns the lookup environment

指定者:
接口 Substitution 中的 environment
另请参见:
Substitution.environment()

erasure

public TypeBinding erasure()
覆盖:
TypeBinding 中的 erasure
另请参见:
TypeBinding.erasure()

fieldCount

public int fieldCount()
覆盖:
ReferenceBinding 中的 fieldCount
另请参见:
ReferenceBinding.fieldCount()

fields

public FieldBinding[] fields()
覆盖:
ReferenceBinding 中的 fields
另请参见:
ReferenceBinding.fields()

genericType

public ReferenceBinding genericType()
Return the original generic type from which the parameterized type got instantiated from. This will perform lazy resolution automatically if needed.

另请参见:
if no resolution is required (unlikely)

genericTypeSignature

public char[] genericTypeSignature()
Ltype; LY;

覆盖:
TypeBinding 中的 genericTypeSignature

getAnnotationTagBits

public long getAnnotationTagBits()
从类 Binding 复制的描述
Compute the tagbits for standard annotations. For source types, these could require lazily resolving corresponding annotation nodes, in case of forward references.

覆盖:
ReferenceBinding 中的 getAnnotationTagBits
另请参见:
ReferenceBinding.getAnnotationTagBits()

getEnclosingInstancesSlotSize

public int getEnclosingInstancesSlotSize()
覆盖:
ReferenceBinding 中的 getEnclosingInstancesSlotSize
返回:
the enclosingInstancesSlotSize

getExactConstructor

public MethodBinding getExactConstructor(TypeBinding[] argumentTypes)
覆盖:
ReferenceBinding 中的 getExactConstructor
另请参见:
ReferenceBinding.getExactConstructor(TypeBinding[])

getExactMethod

public MethodBinding getExactMethod(char[] selector,
                                    TypeBinding[] argumentTypes,
                                    CompilationUnitScope refScope)
覆盖:
ReferenceBinding 中的 getExactMethod
另请参见:
ReferenceBinding.getExactMethod(char[], TypeBinding[],CompilationUnitScope)

getField

public FieldBinding getField(char[] fieldName,
                             boolean needResolve)
覆盖:
ReferenceBinding 中的 getField
另请参见:
ReferenceBinding.getField(char[], boolean)

getMemberType

public ReferenceBinding getMemberType(char[] typeName)
覆盖:
ReferenceBinding 中的 getMemberType
另请参见:
ReferenceBinding.getMemberType(char[])

getMethods

public MethodBinding[] getMethods(char[] selector)
覆盖:
ReferenceBinding 中的 getMethods
另请参见:
ReferenceBinding.getMethods(char[])

getOuterLocalVariablesSlotSize

public int getOuterLocalVariablesSlotSize()
覆盖:
ReferenceBinding 中的 getOuterLocalVariablesSlotSize
返回:
the outerLocalVariablesSlotSize

hasMemberTypes

public boolean hasMemberTypes()
覆盖:
ReferenceBinding 中的 hasMemberTypes

implementsMethod

public boolean implementsMethod(MethodBinding method)
另请参见:
ReferenceBinding.implementsMethod(MethodBinding)

initializeArguments

protected void initializeArguments()

isEquivalentTo

public boolean isEquivalentTo(TypeBinding otherType)
从类 TypeBinding 复制的描述
Returns true if a type is identical to another one, or for generic types, true if compared to its raw type.

覆盖:
TypeBinding 中的 isEquivalentTo

isHierarchyConnected

public boolean isHierarchyConnected()
从类 ReferenceBinding 复制的描述
Returns true if the type hierarchy is connected

覆盖:
ReferenceBinding 中的 isHierarchyConnected

isRawSubstitution

public boolean isRawSubstitution()
从接口 Substitution 复制的描述
Returns true for raw substitution

指定者:
接口 Substitution 中的 isRawSubstitution
另请参见:
Substitution.isRawSubstitution()

kind

public int kind()
覆盖:
TypeBinding 中的 kind

memberTypes

public ReferenceBinding[] memberTypes()
覆盖:
ReferenceBinding 中的 memberTypes
另请参见:
ReferenceBinding.memberTypes()

methods

public MethodBinding[] methods()
覆盖:
ReferenceBinding 中的 methods
另请参见:
ReferenceBinding.methods()

problemId

public int problemId()
Define to be able to get the computeId() for the inner type binding.

覆盖:
Binding 中的 problemId
另请参见:
Binding.problemId()

qualifiedPackageName

public char[] qualifiedPackageName()
从类 TypeBinding 复制的描述
Answer the qualified name of the receiver's package separated by periods or an empty string if its the default package. For example, {java.util}.

覆盖:
TypeBinding 中的 qualifiedPackageName
另请参见:
TypeBinding.qualifiedPackageName()

qualifiedSourceName

public char[] qualifiedSourceName()
从类 ReferenceBinding 复制的描述
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".

覆盖:
ReferenceBinding 中的 qualifiedSourceName
另请参见:
TypeBinding.qualifiedSourceName()

readableName

public char[] readableName()
从类 ReferenceBinding 复制的描述
Answer the receiver's signature. NOTE: This method should only be used during/after code gen.

覆盖:
ReferenceBinding 中的 readableName
另请参见:
Binding.readableName()

shortReadableName

public char[] shortReadableName()
覆盖:
ReferenceBinding 中的 shortReadableName
另请参见:
Binding.shortReadableName()

signature

public char[] signature()
从类 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.

覆盖:
ReferenceBinding 中的 signature
另请参见:
TypeBinding.signature()

sourceName

public char[] sourceName()
覆盖:
ReferenceBinding 中的 sourceName
另请参见:
TypeBinding.sourceName()

substitute

public TypeBinding substitute(TypeVariableBinding originalVariable)
从接口 Substitution 复制的描述
Returns the type substitute for a given type variable, or itself if no substitution got performed.

指定者:
接口 Substitution 中的 substitute
另请参见:
Substitution.substitute(org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding)

superclass

public ReferenceBinding superclass()
覆盖:
ReferenceBinding 中的 superclass
另请参见:
ReferenceBinding.superclass()

superInterfaces

public ReferenceBinding[] superInterfaces()
覆盖:
ReferenceBinding 中的 superInterfaces
另请参见:
ReferenceBinding.superInterfaces()

swapUnresolved

public void swapUnresolved(UnresolvedReferenceBinding unresolvedType,
                           ReferenceBinding resolvedType,
                           LookupEnvironment env)
覆盖:
TypeBinding 中的 swapUnresolved

syntheticEnclosingInstanceTypes

public ReferenceBinding[] syntheticEnclosingInstanceTypes()
覆盖:
ReferenceBinding 中的 syntheticEnclosingInstanceTypes
另请参见:
ReferenceBinding.syntheticEnclosingInstanceTypes()

syntheticOuterLocalVariables

public SyntheticArgumentBinding[] syntheticOuterLocalVariables()
覆盖:
ReferenceBinding 中的 syntheticOuterLocalVariables
另请参见:
ReferenceBinding.syntheticOuterLocalVariables()

toString

public String toString()
覆盖:
Object 中的 toString
另请参见:
Object.toString()

typeVariables

public TypeVariableBinding[] typeVariables()
覆盖:
TypeBinding 中的 typeVariables

unResolvedFields

public FieldBinding[] unResolvedFields()
覆盖:
ReferenceBinding 中的 unResolvedFields


Copyright © 2013. All Rights Reserved.