protected static class TypePool.Default.LazyTypeDescription extends TypeDescription.AbstractBase.OfSimpleType
ByteCodeElement
or
AnnotationDescription
by querying a type pool at lookup time.Modifier and Type | Class and Description |
---|---|
protected static class |
TypePool.Default.LazyTypeDescription.AnnotationToken
A token for representing collected data on an annotation.
|
protected static class |
TypePool.Default.LazyTypeDescription.FieldToken
A token for representing collected data on a field.
|
protected class |
TypePool.Default.LazyTypeDescription.FieldTokenList
A list of field tokens representing each entry as a field description.
|
protected static interface |
TypePool.Default.LazyTypeDescription.GenericTypeToken
A token that represents a generic Java type.
|
protected static class |
TypePool.Default.LazyTypeDescription.LazyNestMemberList
A lazy list that represents all nest members of the represented type.
|
protected static class |
TypePool.Default.LazyTypeDescription.LazyTypeList
A list that is constructing
TypePool.Default.WithLazyResolution.LazyTypeDescription s. |
protected static class |
TypePool.Default.LazyTypeDescription.MethodToken
A token for representing collected data on a method.
|
protected class |
TypePool.Default.LazyTypeDescription.MethodTokenList
A list of method tokens representing each entry as a method description.
|
protected static class |
TypePool.Default.LazyTypeDescription.RecordComponentToken
A token representing a record component.
|
protected class |
TypePool.Default.LazyTypeDescription.RecordComponentTokenList
A list of record component tokens representing each record component as a description.
|
protected static class |
TypePool.Default.LazyTypeDescription.TokenizedGenericType
A representation of a generic type that is described by a
TypePool.Default.LazyTypeDescription.GenericTypeToken . |
protected static interface |
TypePool.Default.LazyTypeDescription.TypeContainment
A declaration context encapsulates information about whether a type was declared within another type
or within a method of another type.
|
TypeDescription.AbstractBase.OfSimpleType.WithDelegation
TypeDescription.AbstractBase.OfSimpleType
TypeDescription.AbstractBase, TypeDescription.ArrayProjection, TypeDescription.ForLoadedType, TypeDescription.ForPackageDescription, TypeDescription.Generic, TypeDescription.Latent, TypeDescription.LazyProxy, TypeDescription.SuperTypeLoading
TypeDefinition.Sort, TypeDefinition.SuperClassIterator
ModifierReviewable.ForFieldDescription, ModifierReviewable.ForMethodDescription, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumeration
ByteCodeElement.Member, ByteCodeElement.Token<T extends ByteCodeElement.Token<T>>, ByteCodeElement.TypeDependant<T extends ByteCodeElement.TypeDependant<?,S>,S extends ByteCodeElement.Token<S>>
NamedElement.WithDescriptor, NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeName
DeclaredByType.WithMandatoryDeclaration
AnnotationSource.Empty, AnnotationSource.Explicit
TypeVariableSource.Visitor<T>
RAW_TYPES
ARRAY_INTERFACES, CLASS, OBJECT, STRING, THROWABLE, UNDEFINED, VOID
RAW_TYPES_PROPERTY
EMPTY_MASK
NON_GENERIC_SIGNATURE
EMPTY_NAME, NO_NAME
Modifier and Type | Method and Description |
---|---|
int |
getActualModifiers(boolean superFlag)
Returns the type's actual modifiers as present in the class file.
|
ClassFileVersion |
getClassFileVersion()
Attempts to resolve the class file version of this type.
|
AnnotationList |
getDeclaredAnnotations()
Returns a list of annotations that are declared by this instance.
|
FieldList<FieldDescription.InDefinedShape> |
getDeclaredFields()
Returns the fields that this type declares.
|
MethodList<MethodDescription.InDefinedShape> |
getDeclaredMethods()
Returns the methods that this type declares.
|
TypeList |
getDeclaredTypes()
Returns a list of types that are declared by this type.
|
TypeDescription |
getDeclaringType()
Returns the declaring type of this instance.
|
MethodDescription.InDefinedShape |
getEnclosingMethod()
Returns a description of the method that encloses this type.
|
TypeDescription |
getEnclosingType()
Returns a description of this type's enclosing type if any.
|
String |
getGenericSignature()
Returns the generic signature of this byte code element.
|
TypeList.Generic |
getInterfaces()
Returns the interfaces that this type implements.
|
int |
getModifiers()
Returns the modifier that is described by this object.
|
String |
getName()
Returns the binary name of this byte code element.
|
TypeDescription |
getNestHost()
Returns the nest host of this type.
|
TypeList |
getNestMembers()
Returns a list of members that are part of a nesting group.
|
PackageDescription |
getPackage()
Returns the package of the type described by this instance or
null if the described type
is a primitive type or an array. |
TypeList |
getPermittedSubtypes()
Returns the list of permitted direct subclasses if this class is a sealed class.
|
RecordComponentList<RecordComponentDescription.InDefinedShape> |
getRecordComponents()
Returns the list of record components that are declared by this type.
|
TypeDescription.Generic |
getSuperClass()
Returns the super class of this type.
|
TypeList.Generic |
getTypeVariables()
Returns the type variables that are declared by this element.
|
boolean |
isAnonymousType()
Checks if this type description represents an anonymous type.
|
boolean |
isLocalType()
Checks if this type description represents a local type.
|
boolean |
isRecord()
Checks if this type is a Java record.
|
boolean |
isSealed()
Returns
true if this class is a sealed class that only permitts a specified range of subclasses. |
getCanonicalName, getComponentType, getDescriptor, getSimpleName, getStackSize, isArray, isPrimitive
accept, asBoxed, asErasure, asGenericType, asUnboxed, equals, getActualName, getDefaultValue, getEnclosingSource, getInheritedAnnotations, getInnerClassCount, getInternalName, getLongSimpleName, getSort, getTypeName, hashCode, isAccessibleTo, isAnnotationReturnType, isAnnotationValue, isAnnotationValue, isAssignableFrom, isAssignableFrom, isAssignableTo, isAssignableTo, isCompileTimeConstant, isGenerified, isInferrable, isInHierarchyWith, isInHierarchyWith, isInnerClass, isInstance, isMemberType, isNestedClass, isNestHost, isNestMateOf, isNestMateOf, isPackageType, isPrimitiveWrapper, isSamePackage, isVisibleTo, iterator, represents, toSafeString, toString
findExpectedVariable, findVariable
getEnumerationState, getFieldManifestation, getFieldPersistence, getMethodManifestation, getMethodStrictness, getOwnership, getParameterManifestation, getProvisioningState, getSynchronizationState, getSyntheticState, getTypeManifestation, getVisibility, isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSynchronized, isSynthetic, isTransient, isVarArgs, isVolatile
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getTypeManifestation, isAnnotation, isInterface
isAbstract
getEnumerationState, isEnum
getOwnership, getVisibility, isDeprecated, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
getSyntheticState, isFinal, isSynthetic
forEach, spliterator
findExpectedVariable, findVariable
protected LazyTypeDescription(TypePool typePool, int actualModifiers, int modifiers, String name, @MaybeNull String superClassInternalName, @MaybeNull String[] interfaceInternalName, @MaybeNull String genericSignature, TypePool.Default.LazyTypeDescription.TypeContainment typeContainment, @MaybeNull String declaringTypeInternalName, List<String> declaredTypes, boolean anonymousType, @MaybeNull String nestHostInternalName, List<String> nestMemberInternalNames, Map<String,List<TypePool.Default.LazyTypeDescription.AnnotationToken>> superClassAnnotationTokens, Map<Integer,Map<String,List<TypePool.Default.LazyTypeDescription.AnnotationToken>>> interfaceAnnotationTokens, Map<Integer,Map<String,List<TypePool.Default.LazyTypeDescription.AnnotationToken>>> typeVariableAnnotationTokens, Map<Integer,Map<Integer,Map<String,List<TypePool.Default.LazyTypeDescription.AnnotationToken>>>> typeVariableBoundsAnnotationTokens, List<TypePool.Default.LazyTypeDescription.AnnotationToken> annotationTokens, List<TypePool.Default.LazyTypeDescription.FieldToken> fieldTokens, List<TypePool.Default.LazyTypeDescription.MethodToken> methodTokens, List<TypePool.Default.LazyTypeDescription.RecordComponentToken> recordComponentTokens, List<String> permittedSubclasses, ClassFileVersion classFileVersion)
typePool
- The type pool to be used for looking up linked types.actualModifiers
- The actual modifiers of this type.modifiers
- The modifiers of this type.name
- The binary name of this type.superClassInternalName
- The internal name of this type's super type or null
if no such super type is defined.interfaceInternalName
- An array of this type's interfaces or null
if this type does not define any interfaces.genericSignature
- The type's generic signature as found in the class file or null
if the type is not generic.typeContainment
- A definition of this type's containment within another type or method.declaringTypeInternalName
- The internal name of this type's declaring type or null
if no such type exists.declaredTypes
- A list of descriptors representing the types that are declared by this type.anonymousType
- true
if this type is an anonymous type.nestHostInternalName
- The internal name of the nest host or null
if no nest host was specified.nestMemberInternalNames
- A list of internal names of the nest members.superClassAnnotationTokens
- A mapping of the super class's annotation tokens.interfaceAnnotationTokens
- A mapping of type annotations for this type's interface types by their indices.typeVariableAnnotationTokens
- A mapping of type annotations of the type variables' type annotations by their indices.typeVariableBoundsAnnotationTokens
- A mapping of type annotations of the type variables' bounds' type annotations by their indices
and each variable's index.annotationTokens
- A list of tokens that represent the annotations of this type.fieldTokens
- A list of field tokens describing the field's of this type.methodTokens
- A list of method tokens describing the method's of this type.recordComponentTokens
- A list of record component tokens describing the record components of this type.permittedSubclasses
- A list of internal names of permitted subclasses.classFileVersion
- The type's class file version.@MaybeNull public TypeDescription.Generic getSuperClass()
TypeDefinition.Sort.NON_GENERIC
),
parameterized types (TypeDefinition.Sort.PARAMETERIZED
) or generic array types (TypeDefinition.Sort.GENERIC_ARRAY
) types. Interface types
and the Object
class do not define a super class where null
is returned. Array types define Object
as their direct super class.null
if no super class exists for this type.public TypeList.Generic getInterfaces()
TypeDefinition.Sort.NON_GENERIC
),
parameterized types (TypeDefinition.Sort.PARAMETERIZED
) or generic array types (TypeDefinition.Sort.GENERIC_ARRAY
) types.@MaybeNull public MethodDescription.InDefinedShape getEnclosingMethod()
null
is returned by this method.null
if there is no such method.@MaybeNull public TypeDescription getEnclosingType()
null
if there is no such type.public TypeList getDeclaredTypes()
public boolean isAnonymousType()
true
if this type description represents an anonymous type.public boolean isLocalType()
true
if this type description represents a local type.public FieldList<FieldDescription.InDefinedShape> getDeclaredFields()
TypeDefinition.Sort.NON_GENERIC
),
parameterized types (TypeDefinition.Sort.PARAMETERIZED
) or generic array types (TypeDefinition.Sort.GENERIC_ARRAY
) types. Generic array
types never define fields and the returned list is always empty for such types.TypeDefinition.Sort.NON_GENERIC
),
parameterized types (TypeDefinition.Sort.PARAMETERIZED
) or generic array types (TypeDefinition.Sort.GENERIC_ARRAY
) types. Generic array
types never define methods and the returned list is always empty for such types.public MethodList<MethodDescription.InDefinedShape> getDeclaredMethods()
@MaybeNull public PackageDescription getPackage()
null
if the described type
is a primitive type or an array.null
if the described type
is a primitive type or an array.public String getName()
@MaybeNull public TypeDescription getDeclaringType()
null
if no such type exists.public int getModifiers()
public int getActualModifiers(boolean superFlag)
private
.
but it modifiers might reflect this property nevertheless if a class was defined as a private inner class. The
returned modifiers take also into account if the type is marked as Deprecated
. Anonymous classes that are
enclosed in a static method or the type initializer are additionally marked as final
as it is also done
by the Java compiler.getActualModifiers
in interface TypeDescription
getActualModifiers
in class TypeDescription.AbstractBase
superFlag
- true
if the modifier's super flag should be set.public TypeDescription getNestHost()
public TypeList getNestMembers()
public AnnotationList getDeclaredAnnotations()
public TypeList.Generic getTypeVariables()
@MaybeNull public String getGenericSignature()
TypeDescription.AbstractBase
null
is returned as a signature.getGenericSignature
in interface NamedElement.WithDescriptor
getGenericSignature
in class TypeDescription.AbstractBase
null
if this element is not generic.public RecordComponentList<RecordComponentDescription.InDefinedShape> getRecordComponents()
public boolean isRecord()
true
if this type is a Java record.public boolean isSealed()
TypeDescription.AbstractBase
true
if this class is a sealed class that only permitts a specified range of subclasses.isSealed
in interface TypeDescription
isSealed
in class TypeDescription.AbstractBase
true
if this class is a sealed class that only permitts a specified range of subclasses.public TypeList getPermittedSubtypes()
public ClassFileVersion getClassFileVersion()
TypeDescription.AbstractBase
null
is returned.getClassFileVersion
in interface TypeDescription
getClassFileVersion
in class TypeDescription.AbstractBase
null
if it cannot be resolved.Copyright © 2014–2024. All rights reserved.