Package com.strobel.assembler.metadata
Class TypeReference
java.lang.Object
com.strobel.assembler.metadata.MemberReference
com.strobel.assembler.metadata.TypeReference
- All Implemented Interfaces:
IAnnotationsProvider
,IGenericContext
,IGenericParameterProvider
,IMetadataTypeMember
- Direct Known Subclasses:
ArrayType
,BytecodeLanguage.DummyTypeReference
,CapturedType
,CompoundTypeReference
,CoreMetadataFactory.UnresolvedGenericType
,CoreMetadataFactory.UnresolvedType
,ParameterizedType
,RawType
,TypeDefinition
,UnionType
,WildcardType
public abstract class TypeReference
extends MemberReference
implements IGenericParameterProvider, IGenericContext
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ArrayType
private TypeReference
private String
static final TypeReference[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract <R,
P> R accept
(TypeMetadataVisitor<P, R> visitor, P parameter) protected StringBuilder
protected StringBuilder
protected StringBuilder
protected StringBuilder
protected StringBuilder
protected StringBuilder
protected StringBuilder
protected StringBuilder
protected StringBuilder
appendName
(StringBuilder sb, boolean fullName, boolean dottedName) protected StringBuilder
protected StringBuilder
protected static boolean
checkRecursive
(TypeReference type, List<? extends TypeReference> arguments) private static boolean
checkRecursiveCore
(String typeName, List<? extends TypeReference> arguments, int depth) boolean
boolean
findTypeVariable
(String name) Human-readable brief description of a type or member, which does not include information super types, thrown exceptions, or modifiers other than 'static'.Human-readable full description of a type or member, which includes specification of super types (in brief format), thrown exceptions, and modifiers.Human-readable erased description of a type or member.getName()
Human-readable simple description of a type or member, which does not include information super type or fully-qualified type names.abstract String
boolean
boolean
int
hashCode()
boolean
boolean
isArray()
boolean
boolean
boolean
isEquivalentTo
(MemberReference member) boolean
boolean
boolean
boolean
isNested()
boolean
boolean
boolean
boolean
isVoid()
boolean
makeGenericType
(TypeReference... typeArguments) makeGenericType
(List<? extends TypeReference> typeArguments) resolve()
resolve
(FieldReference field) resolve
(MethodReference method) resolve
(TypeReference type) protected final void
setDeclaringType
(TypeReference declaringType) protected void
toString()
Methods inherited from class com.strobel.assembler.metadata.MemberReference
getAnnotations, getErasedSignature, getSignature, hasAnnotations, isDefinition, isSpecialName
-
Field Details
-
EMPTY_REFERENCES
-
_name
-
_declaringType
-
_arrayType
-
-
Constructor Details
-
TypeReference
public TypeReference()
-
-
Method Details
-
containsGenericParameters
public boolean containsGenericParameters()- Overrides:
containsGenericParameters
in classMemberReference
-
getName
- Specified by:
getName
in interfaceIMetadataTypeMember
- Specified by:
getName
in classMemberReference
-
getPackageName
-
getDeclaringType
- Specified by:
getDeclaringType
in interfaceIMetadataTypeMember
- Specified by:
getDeclaringType
in classMemberReference
-
isEquivalentTo
- Overrides:
isEquivalentTo
in classMemberReference
-
setName
-
setDeclaringType
-
getSimpleName
-
getFullName
- Overrides:
getFullName
in classMemberReference
-
getInternalName
-
getUnderlyingType
-
getElementType
-
accept
-
hashCode
public int hashCode() -
equals
-
makeArrayType
-
makeGenericType
-
makeGenericType
-
isWildcardType
public boolean isWildcardType() -
isCompoundType
public boolean isCompoundType() -
isUnionType
public boolean isUnionType() -
isBoundedType
public boolean isBoundedType() -
isUnbounded
public boolean isUnbounded() -
hasExtendsBound
public boolean hasExtendsBound() -
hasSuperBound
public boolean hasSuperBound() -
getExtendsBound
-
getSuperBound
-
getSimpleType
-
isNested
public boolean isNested() -
isArray
public boolean isArray() -
isPrimitive
public boolean isPrimitive() -
isVoid
public boolean isVoid() -
hasGenericParameters
public boolean hasGenericParameters()- Specified by:
hasGenericParameters
in interfaceIGenericParameterProvider
-
isGenericDefinition
public boolean isGenericDefinition()- Specified by:
isGenericDefinition
in interfaceIGenericParameterProvider
-
getGenericParameters
- Specified by:
getGenericParameters
in interfaceIGenericParameterProvider
-
isGenericParameter
public boolean isGenericParameter() -
isGenericType
public boolean isGenericType() -
getRawType
-
findTypeVariable
- Specified by:
findTypeVariable
in interfaceIGenericContext
-
getBriefDescription
Human-readable brief description of a type or member, which does not include information super types, thrown exceptions, or modifiers other than 'static'. -
getDescription
Human-readable full description of a type or member, which includes specification of super types (in brief format), thrown exceptions, and modifiers. -
getErasedDescription
Human-readable erased description of a type or member. -
getSimpleDescription
Human-readable simple description of a type or member, which does not include information super type or fully-qualified type names. -
appendName
- Specified by:
appendName
in classMemberReference
-
appendBriefDescription
-
appendSimpleDescription
-
appendErasedDescription
-
appendDescription
-
appendSignature
- Specified by:
appendSignature
in classMemberReference
-
appendErasedSignature
- Specified by:
appendErasedSignature
in classMemberReference
-
toString
- Overrides:
toString
in classMemberReference
-
appendGenericSignature
-
appendClassSignature
-
appendErasedClassSignature
-
appendClassDescription
-
resolve
-
resolve
-
resolve
-
resolve
-
checkRecursive
protected static boolean checkRecursive(TypeReference type, List<? extends TypeReference> arguments) -
checkRecursiveCore
private static boolean checkRecursiveCore(String typeName, List<? extends TypeReference> arguments, int depth)
-