public static class TypeDescription.Latent extends TypeDescription.AbstractBase.OfSimpleType
A latent type description for a type without methods or fields.
Important: This type does not define most of its properties and should only be used as a simple placeholder. For more
complex placeholders, use an InstrumentedType.Default
.
TypeDescription.AbstractBase.OfSimpleType.WithDelegation
TypeDescription.AbstractBase.OfSimpleType
TypeDescription.AbstractBase, TypeDescription.ArrayProjection, TypeDescription.ForLoadedType, TypeDescription.ForPackageDescription, TypeDescription.Generic, TypeDescription.Latent, TypeDescription.SuperTypeLoading
TypeDefinition.Sort, TypeDefinition.SuperClassIterator
ModifierReviewable.ForFieldDescription, ModifierReviewable.ForMethodDescription, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumeration
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
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
Constructor and Description |
---|
Latent(String name,
int modifiers,
TypeDescription.Generic superClass,
List<? extends TypeDescription.Generic> interfaces)
Creates a new latent type.
|
Latent(String name,
int modifiers,
TypeDescription.Generic superClass,
TypeDescription.Generic... anInterface)
Creates a new latent type.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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 internalName 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 does not imply a package. |
TypeList |
getPermittedSubclasses()
Returns the list of permitted subclasses if this class is a sealed class or an empty list if this class is not sealed.
|
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.
|
getCanonicalName, getComponentType, getDescriptor, getSimpleName, getStackSize, isArray, isPrimitive
accept, asBoxed, asErasure, asGenericType, asUnboxed, equals, getActualModifiers, getActualName, getDefaultValue, getEnclosingSource, getGenericSignature, getInheritedAnnotations, getInnerClassCount, getInternalName, 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, isSealed, isVisibleTo, iterator, represents, toString
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
findVariable
public Latent(String name, int modifiers, TypeDescription.Generic superClass, TypeDescription.Generic... anInterface)
name
- The name of the type.modifiers
- The modifiers of the type.superClass
- The super type or null
if no such type exists.anInterface
- The interfaces that this type implements.public Latent(String name, int modifiers, TypeDescription.Generic superClass, List<? extends TypeDescription.Generic> interfaces)
name
- The name of the type.modifiers
- The modifiers of the type.superClass
- The super type or null
if no such type exists.interfaces
- The interfaces that this type implements.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.public MethodDescription.InDefinedShape getEnclosingMethod()
null
is returned by this method.null
if there is no such method.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()
public PackageDescription getPackage()
null
if the described type does not imply a package.null
if the described type does not imply a package.public AnnotationList getDeclaredAnnotations()
public TypeDescription getDeclaringType()
null
if no such type exists.public int getModifiers()
public String getName()
public TypeList.Generic getTypeVariables()
public TypeDescription getNestHost()
public TypeList getNestMembers()
public RecordComponentList<RecordComponentDescription.InDefinedShape> getRecordComponents()
public boolean isRecord()
true
if this type is a Java record.public TypeList getPermittedSubclasses()
Copyright © 2014–2020. All rights reserved.