Class TypeDescription.AbstractBase
- java.lang.Object
-
- net.bytebuddy.description.ModifierReviewable.AbstractBase
-
- net.bytebuddy.description.TypeVariableSource.AbstractBase
-
- net.bytebuddy.description.type.TypeDescription.AbstractBase
-
- All Implemented Interfaces:
java.lang.Iterable<TypeDefinition>
,AnnotationSource
,ByteCodeElement
,DeclaredByType
,ModifierReviewable
,ModifierReviewable.ForFieldDescription
,ModifierReviewable.ForMethodDescription
,ModifierReviewable.ForParameterDescription
,ModifierReviewable.ForTypeDefinition
,ModifierReviewable.OfAbstraction
,ModifierReviewable.OfByteCodeElement
,ModifierReviewable.OfEnumeration
,NamedElement
,NamedElement.WithDescriptor
,NamedElement.WithRuntimeName
,TypeDefinition
,TypeDescription
,TypeVariableSource
- Direct Known Subclasses:
TypeDescription.AbstractBase.OfSimpleType
,TypeDescription.ArrayProjection
,TypeDescription.ForLoadedType
,TypeDescription.SuperTypeLoading
- Enclosing interface:
- TypeDescription
public abstract static class TypeDescription.AbstractBase extends TypeVariableSource.AbstractBase implements TypeDescription
An abstract base implementation of a type description.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TypeDescription.AbstractBase.OfSimpleType
An adapter implementation of aTypeDescription
that describes any type that is not an array or a primitive type.-
Nested classes/interfaces inherited from interface net.bytebuddy.description.annotation.AnnotationSource
AnnotationSource.Empty, AnnotationSource.Explicit
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.ByteCodeElement
ByteCodeElement.Token<T extends ByteCodeElement.Token<T>>, ByteCodeElement.TypeDependant<T extends ByteCodeElement.TypeDependant<?,S>,S extends ByteCodeElement.Token<S>>
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.ModifierReviewable
ModifierReviewable.AbstractBase, ModifierReviewable.ForFieldDescription, ModifierReviewable.ForMethodDescription, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumeration
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.NamedElement
NamedElement.WithDescriptor, NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeName
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.type.TypeDefinition
TypeDefinition.Sort, TypeDefinition.SuperClassIterator
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.type.TypeDescription
TypeDescription.AbstractBase, TypeDescription.ArrayProjection, TypeDescription.ForLoadedType, TypeDescription.ForPackageDescription, TypeDescription.Generic, TypeDescription.Latent, TypeDescription.SuperTypeLoading
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.TypeVariableSource
TypeVariableSource.AbstractBase, TypeVariableSource.Visitor<T>
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
RAW_TYPES
TheTypeDefinition.RAW_TYPES_PROPERTY
property.-
Fields inherited from interface net.bytebuddy.description.ModifierReviewable
EMPTY_MASK
-
Fields inherited from interface net.bytebuddy.description.NamedElement
EMPTY_NAME, NO_NAME
-
Fields inherited from interface net.bytebuddy.description.NamedElement.WithDescriptor
NON_GENERIC_SIGNATURE
-
Fields inherited from interface net.bytebuddy.description.type.TypeDefinition
RAW_TYPES_PROPERTY
-
Fields inherited from interface net.bytebuddy.description.type.TypeDescription
ARRAY_INTERFACES, CLASS, OBJECT, STRING, THROWABLE, UNDEFINED, VOID
-
Fields inherited from interface net.bytebuddy.description.TypeVariableSource
UNDEFINED
-
-
Constructor Summary
Constructors Constructor Description AbstractBase()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
accept(TypeVariableSource.Visitor<T> visitor)
Applies a visitor on this type variable source.TypeDescription
asBoxed()
Returns a description of this type that represents this type as a boxed type for primitive types, unless itsvoid
.TypeDescription
asErasure()
Returns the erasure of this type.TypeDescription.Generic
asGenericType()
Returns this type definition as a generic type.TypeDescription
asUnboxed()
Returns a description of this type that represents this type as an unboxed type for boxing types, unless itsVoid
.boolean
equals(java.lang.Object other)
int
getActualModifiers(boolean superFlag)
Returns the type's actual modifiers as present in the class file.java.lang.String
getActualName()
Returns the name of this element as it is found in the source code.java.lang.Object
getDefaultValue()
Returns the default value for this type, i.e.TypeVariableSource
getEnclosingSource()
Returns the enclosing source of type variables that are valid in the scope of this type variable source.java.lang.String
getGenericSignature()
Returns the generic signature of this byte code element.AnnotationList
getInheritedAnnotations()
Returns the annotations that this type declares or inherits from super types.int
getInnerClassCount()
Returns the amount of outer classes this type defines.java.lang.String
getInternalName()
Returns the internal internalName of this byte code element.TypeDefinition.Sort
getSort()
Returns the sort of the generic type this instance represents.java.lang.String
getTypeName()
Returns the name of the type.int
hashCode()
boolean
isAccessibleTo(TypeDescription typeDescription)
Checks if this element is accessible from a given type.boolean
isAnnotationReturnType()
Checks if instances of this type can be returned from an annotation method.boolean
isAnnotationValue()
Checks if instances of this type can be used for describing an annotation value.boolean
isAnnotationValue(java.lang.Object value)
Checks if instances of this type can be used for describing the given annotation value.private static boolean
isAssignable(TypeDescription sourceType, TypeDescription targetType)
Checks if a specific type is assignable to another type where the source type must be a super type of the target type.boolean
isAssignableFrom(java.lang.Class<?> type)
Checks if this type is assignable from the type described by this instance, for example forclass Foo
andclass Bar extends Foo
, this method would returntrue
forFoo.class.isAssignableFrom(Bar.class)
.boolean
isAssignableFrom(TypeDescription typeDescription)
Checks if this type is assignable from the type described by this instance, for example forclass Foo
andclass Bar extends Foo
, this method would returntrue
forFoo.class.isAssignableFrom(Bar.class)
.boolean
isAssignableTo(java.lang.Class<?> type)
Checks if this type is assignable from the type described by this instance, for example forclass Foo
andclass Bar extends Foo
, this method would returntrue
forBar.class.isAssignableTo(Foo.class)
.boolean
isAssignableTo(TypeDescription typeDescription)
Checks if this type is assignable from the type described by this instance, for example forclass Foo
andclass Bar extends Foo
, this method would returntrue
forBar.class.isAssignableFrom(Foo.class)
.boolean
isCompileTimeConstant()
Indicates if this type represents a compile-time constant, i.e.boolean
isGenerified()
Checks if this type variable source has a generic declaration.boolean
isInferrable()
Returnstrue
if type variables declared by this type variable source allow dynamic type inference.boolean
isInHierarchyWith(java.lang.Class<?> type)
Returnstrue
if this type and the supplied type are in a type hierarchy with each other, i.e.boolean
isInHierarchyWith(TypeDescription typeDescription)
Returnstrue
if this type and the supplied type are in a type hierarchy with each other, i.e.boolean
isInnerClass()
Indicates if this class is an inner class.boolean
isInstance(java.lang.Object value)
Checks ifvalue
is an instance of the type represented by this instance.boolean
isMemberType()
Checks if this type description represents a member type.boolean
isNestedClass()
Indicates if this class is a nested class.boolean
isNestHost()
Checks if this class is the host of a nest group.boolean
isNestMateOf(java.lang.Class<?> type)
Checks if this type and the supplied type are members of the same nest group.boolean
isNestMateOf(TypeDescription typeDescription)
Checks if this type and the supplied type are members of the same nest group.boolean
isPackageType()
Checks if this type represents a class that is a place holder for a package description.boolean
isPrimitiveWrapper()
Checks if this type represents a wrapper type for a primitive type.boolean
isSamePackage(TypeDescription typeDescription)
Checks if two types are defined in the same package.boolean
isSealed()
Returnstrue
if this class is a sealed class that only permitts a specified range of subclasses.boolean
isVisibleTo(TypeDescription typeDescription)
Checks if this element is visible from a given type.java.util.Iterator<TypeDefinition>
iterator()
boolean
represents(java.lang.reflect.Type type)
Checks if the type described by this instance representstype
.java.lang.String
toString()
-
Methods inherited from class net.bytebuddy.description.TypeVariableSource.AbstractBase
findVariable
-
Methods inherited from class net.bytebuddy.description.ModifierReviewable.AbstractBase
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
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.bytebuddy.description.annotation.AnnotationSource
getDeclaredAnnotations
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable
getModifiers, getSyntheticState, isFinal, isSynthetic
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.ForTypeDefinition
getTypeManifestation, isAnnotation, isInterface
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.OfAbstraction
isAbstract
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.OfByteCodeElement
getOwnership, getVisibility, isDeprecated, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.OfEnumeration
getEnumerationState, isEnum
-
Methods inherited from interface net.bytebuddy.description.NamedElement.WithDescriptor
getDescriptor
-
Methods inherited from interface net.bytebuddy.description.NamedElement.WithRuntimeName
getName
-
Methods inherited from interface net.bytebuddy.description.type.TypeDefinition
getInterfaces, getStackSize, getSuperClass, isArray, isPrimitive, isRecord
-
Methods inherited from interface net.bytebuddy.description.type.TypeDescription
getCanonicalName, getComponentType, getDeclaredFields, getDeclaredMethods, getDeclaredTypes, getDeclaringType, getEnclosingMethod, getEnclosingType, getNestHost, getNestMembers, getPackage, getPermittedSubclasses, getRecordComponents, getSimpleName, isAnonymousType, isLocalType
-
Methods inherited from interface net.bytebuddy.description.TypeVariableSource
findVariable, getTypeVariables
-
-
-
-
Field Detail
-
RAW_TYPES
public static final boolean RAW_TYPES
TheTypeDefinition.RAW_TYPES_PROPERTY
property.
-
-
Method Detail
-
isAssignable
private static boolean isAssignable(TypeDescription sourceType, TypeDescription targetType)
Checks if a specific type is assignable to another type where the source type must be a super type of the target type.- Parameters:
sourceType
- The source type to which another type is to be assigned to.targetType
- The target type that is to be assigned to the source type.- Returns:
true
if the target type is assignable to the source type.
-
isAssignableFrom
public boolean isAssignableFrom(java.lang.Class<?> type)
Checks if this type is assignable from the type described by this instance, for example forclass Foo
andclass Bar extends Foo
, this method would returntrue
forFoo.class.isAssignableFrom(Bar.class)
.- Specified by:
isAssignableFrom
in interfaceTypeDescription
- Parameters:
type
- The type of interest.- Returns:
true
if this type is assignable fromtype
.
-
isAssignableFrom
public boolean isAssignableFrom(TypeDescription typeDescription)
Checks if this type is assignable from the type described by this instance, for example forclass Foo
andclass Bar extends Foo
, this method would returntrue
forFoo.class.isAssignableFrom(Bar.class)
.TypeDescription.isAssignableFrom(Class)
- Specified by:
isAssignableFrom
in interfaceTypeDescription
- Parameters:
typeDescription
- The type of interest.- Returns:
true
if this type is assignable fromtype
.
-
isAssignableTo
public boolean isAssignableTo(java.lang.Class<?> type)
Checks if this type is assignable from the type described by this instance, for example forclass Foo
andclass Bar extends Foo
, this method would returntrue
forBar.class.isAssignableTo(Foo.class)
.- Specified by:
isAssignableTo
in interfaceTypeDescription
- Parameters:
type
- The type of interest.- Returns:
true
if this type is assignable totype
.
-
isAssignableTo
public boolean isAssignableTo(TypeDescription typeDescription)
Checks if this type is assignable from the type described by this instance, for example forclass Foo
andclass Bar extends Foo
, this method would returntrue
forBar.class.isAssignableFrom(Foo.class)
.TypeDescription.isAssignableTo(Class)
- Specified by:
isAssignableTo
in interfaceTypeDescription
- Parameters:
typeDescription
- The type of interest.- Returns:
true
if this type is assignable totype
.
-
isInHierarchyWith
public boolean isInHierarchyWith(java.lang.Class<?> type)
Returnstrue
if this type and the supplied type are in a type hierarchy with each other, i.e. if this type is assignable to the supplied type or the other way around.- Specified by:
isInHierarchyWith
in interfaceTypeDescription
- Parameters:
type
- The type of interest.- Returns:
true
if this type and the supplied type are in a type hierarchy with each other.
-
isInHierarchyWith
public boolean isInHierarchyWith(TypeDescription typeDescription)
Returnstrue
if this type and the supplied type are in a type hierarchy with each other, i.e. if this type is assignable to the supplied type or the other way around.- Specified by:
isInHierarchyWith
in interfaceTypeDescription
- Parameters:
typeDescription
- The type of interest.- Returns:
true
if this type and the supplied type are in a type hierarchy with each other.
-
asErasure
public TypeDescription asErasure()
Returns the erasure of this type. Wildcard types (TypeDefinition.Sort.WILDCARD
) do not have a well-defined erasure and cause anIllegalStateException
to be thrown.- Specified by:
asErasure
in interfaceTypeDefinition
- Returns:
- The erasure of this type.
-
asGenericType
public TypeDescription.Generic asGenericType()
Returns this type definition as a generic type.- Specified by:
asGenericType
in interfaceTypeDefinition
- Returns:
- This type definition represented as a generic type.
-
getSort
public TypeDefinition.Sort getSort()
Returns the sort of the generic type this instance represents.- Specified by:
getSort
in interfaceTypeDefinition
- Returns:
- The sort of the generic type.
-
isInstance
public boolean isInstance(java.lang.Object value)
Checks ifvalue
is an instance of the type represented by this instance.- Specified by:
isInstance
in interfaceTypeDescription
- Parameters:
value
- The object of interest.- Returns:
true
if the object is an instance of the type described by this instance.
-
isAnnotationValue
public boolean isAnnotationValue(java.lang.Object value)
Checks if instances of this type can be used for describing the given annotation value.- Specified by:
isAnnotationValue
in interfaceTypeDescription
- Parameters:
value
- The value that is supposed to describe the annotation value for this instance.- Returns:
true
if instances of this type can be used for describing the given annotation value..
-
getInternalName
public java.lang.String getInternalName()
Returns the internal internalName of this byte code element.- Specified by:
getInternalName
in interfaceNamedElement.WithRuntimeName
- Returns:
- The internal internalName of this byte code element as used within the Java class file format.
-
getActualModifiers
public int getActualModifiers(boolean superFlag)
Returns the type's actual modifiers as present in the class file. For example, a type cannot beprivate
. 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 asDeprecated
. Anonymous classes that are enclosed in a static method or the type initializer are additionally marked asfinal
as it is also done by the Java compiler.- Specified by:
getActualModifiers
in interfaceTypeDescription
- Parameters:
superFlag
-true
if the modifier's super flag should be set.- Returns:
- The type's actual modifiers.
-
getGenericSignature
public java.lang.String getGenericSignature()
Returns the generic signature of this byte code element. If this element does not reference generic types or references malformed generic types,null
is returned as a signature.- Specified by:
getGenericSignature
in interfaceNamedElement.WithDescriptor
- Returns:
- The generic signature or
null
if this element is not generic.
-
isSamePackage
public boolean isSamePackage(TypeDescription typeDescription)
Checks if two types are defined in the same package.- Specified by:
isSamePackage
in interfaceTypeDescription
- Parameters:
typeDescription
- The type of interest.- Returns:
true
if this type and the given type are in the same package.
-
isVisibleTo
public boolean isVisibleTo(TypeDescription typeDescription)
Checks if this element is visible from a given type. Visibility is a wider criteria then accessibility which can be checked by
ByteCodeElement.isAccessibleTo(TypeDescription)
. Visibility allows the invocation of a method on itself or on external instances.Note: A method or field might define a signature that includes types that are not visible to a type. Such methods can be legally invoked from this type and can even be implemented as bridge methods by this type. It is however not legal to declare a method with invisible types in its signature that are not bridges what might require additional validation.
Important: Virtual byte code elements, i.e. virtual methods, are only considered visible if the type they are invoked upon is visible to a given type. The visibility of such virtual members can therefore not be determined by only investigating the invoked method but requires an additional check of the target type.
- Specified by:
isVisibleTo
in interfaceByteCodeElement
- Parameters:
typeDescription
- The type which is checked for its visibility of this element.- Returns:
true
if this element is visible fortypeDescription
.
-
isAccessibleTo
public boolean isAccessibleTo(TypeDescription typeDescription)
Checks if this element is accessible from a given type. Accessibility is a more narrow criteria then visibility which can be checked by
ByteCodeElement.isVisibleTo(TypeDescription)
. Accessibility allows the invocation of a method on external instances or on itself. Methods that can be invoked from within an instance might however not be considered accessible.Note: A method or field might define a signature that includes types that are not visible to a type. Such methods can be legally invoked from this type and can even be implemented as bridge methods by this type. It is however not legal to declare a method with invisible types in its signature that are not bridges what might require additional validation.
Important: Virtual byte code elements, i.e. virtual methods, are only considered visible if the type they are invoked upon is visible to a given type. The visibility of such virtual members can therefore not be determined by only investigating the invoked method but requires an additional check of the target type.
- Specified by:
isAccessibleTo
in interfaceByteCodeElement
- Parameters:
typeDescription
- The type which is checked for its accessibility of this element.- Returns:
true
if this element is accessible fortypeDescription
.
-
getInheritedAnnotations
public AnnotationList getInheritedAnnotations()
Returns the annotations that this type declares or inherits from super types.- Specified by:
getInheritedAnnotations
in interfaceTypeDescription
- Returns:
- A list of all inherited annotations.
-
getActualName
public java.lang.String getActualName()
Returns the name of this element as it is found in the source code. If no such name exists, an empty string is returned.- Specified by:
getActualName
in interfaceNamedElement
- Returns:
- The name of this element as given in a Java program's source code.
-
isPrimitiveWrapper
public boolean isPrimitiveWrapper()
Checks if this type represents a wrapper type for a primitive type. TheVoid
type is not considered to be a wrapper type.- Specified by:
isPrimitiveWrapper
in interfaceTypeDescription
- Returns:
true
if this type represents a wrapper type.
-
isAnnotationReturnType
public boolean isAnnotationReturnType()
Checks if instances of this type can be returned from an annotation method.- Specified by:
isAnnotationReturnType
in interfaceTypeDescription
- Returns:
true
if instances of this type can be returned from an annotation method.
-
isAnnotationValue
public boolean isAnnotationValue()
Checks if instances of this type can be used for describing an annotation value.- Specified by:
isAnnotationValue
in interfaceTypeDescription
- Returns:
true
if instances of this type can be used for describing an annotation value.
-
represents
public boolean represents(java.lang.reflect.Type type)
Checks if the type described by this instance representstype
.- Specified by:
represents
in interfaceTypeDefinition
- Parameters:
type
- The type of interest.- Returns:
true
if the type described by this instance representstype
.
-
getTypeName
public java.lang.String getTypeName()
Returns the name of the type. For generic types, this name is theirObject.toString()
representations. For a non-generic type, it is the fully qualified binary name of the type.- Specified by:
getTypeName
in interfaceTypeDefinition
- Returns:
- The name of this type.
-
getEnclosingSource
public TypeVariableSource getEnclosingSource()
Returns the enclosing source of type variables that are valid in the scope of this type variable source.- Specified by:
getEnclosingSource
in interfaceTypeVariableSource
- Returns:
- The enclosing source or
null
if no such source exists.
-
isInferrable
public boolean isInferrable()
Returnstrue
if type variables declared by this type variable source allow dynamic type inference.- Specified by:
isInferrable
in interfaceTypeVariableSource
- Returns:
true
if type variables declared by this type variable source allow dynamic type inference.
-
accept
public <T> T accept(TypeVariableSource.Visitor<T> visitor)
Applies a visitor on this type variable source.- Specified by:
accept
in interfaceTypeVariableSource
- Type Parameters:
T
- The visitor's return type.- Parameters:
visitor
- The visitor to apply.- Returns:
- The visitor's return value.
-
isPackageType
public boolean isPackageType()
Checks if this type represents a class that is a place holder for a package description.- Specified by:
isPackageType
in interfaceTypeDescription
- Returns:
true
if this type represents a package description.
-
isGenerified
public boolean isGenerified()
Checks if this type variable source has a generic declaration. This means:- A type declares type variables or is an inner class of a type with a generic declaration.
- A method declares at least one type variable.
- Specified by:
isGenerified
in interfaceTypeVariableSource
- Returns:
true
if this type code element has a generic declaration.
-
getInnerClassCount
public int getInnerClassCount()
Returns the amount of outer classes this type defines. If this type is not an inner type of another class,0
is returned.- Specified by:
getInnerClassCount
in interfaceTypeDescription
- Returns:
- The number of outer classes relatively to this type.
-
isInnerClass
public boolean isInnerClass()
Indicates if this class is an inner class.- Specified by:
isInnerClass
in interfaceTypeDescription
- Returns:
true
if this class is an inner class.
-
isNestedClass
public boolean isNestedClass()
Indicates if this class is a nested class.- Specified by:
isNestedClass
in interfaceTypeDescription
- Returns:
true
if this class is a nested class.
-
asBoxed
public TypeDescription asBoxed()
Returns a description of this type that represents this type as a boxed type for primitive types, unless itsvoid
.- Specified by:
asBoxed
in interfaceTypeDescription
- Returns:
- A description of this type in its boxed form.
-
asUnboxed
public TypeDescription asUnboxed()
Returns a description of this type that represents this type as an unboxed type for boxing types, unless itsVoid
.- Specified by:
asUnboxed
in interfaceTypeDescription
- Returns:
- A description of this type in its unboxed form.
-
getDefaultValue
public java.lang.Object getDefaultValue()
Returns the default value for this type, i.e. the zero value for a primitive type andnull
for a reference type. Forvoid
,null
is returned.- Specified by:
getDefaultValue
in interfaceTypeDescription
- Returns:
- This types default value.
-
isNestHost
public boolean isNestHost()
Checks if this class is the host of a nest group.- Specified by:
isNestHost
in interfaceTypeDescription
- Returns:
true
if this class is a nest group's host.
-
isNestMateOf
public boolean isNestMateOf(java.lang.Class<?> type)
Checks if this type and the supplied type are members of the same nest group.- Specified by:
isNestMateOf
in interfaceTypeDescription
- Parameters:
type
- The type for which to check if it is a member of the same nest group.- Returns:
true
if this type and the supplied type are members of the same nest group.
-
isNestMateOf
public boolean isNestMateOf(TypeDescription typeDescription)
Checks if this type and the supplied type are members of the same nest group.- Specified by:
isNestMateOf
in interfaceTypeDescription
- Parameters:
typeDescription
- The type for which to check if it is a member of the same nest group.- Returns:
true
if this type and the supplied type are members of the same nest group.
-
isMemberType
public boolean isMemberType()
Checks if this type description represents a member type.- Specified by:
isMemberType
in interfaceTypeDescription
- Returns:
true
if this type description represents a member type.
-
isCompileTimeConstant
public boolean isCompileTimeConstant()
Indicates if this type represents a compile-time constant, i.e.int
,long
,float
,double
,String
,Class
orjava.lang.invoke.MethodHandle
orjava.lang.invoke.MethodType
.- Specified by:
isCompileTimeConstant
in interfaceTypeDescription
- Returns:
true
if this type represents a compile-time constant.
-
isSealed
public boolean isSealed()
Returnstrue
if this class is a sealed class that only permitts a specified range of subclasses.- Specified by:
isSealed
in interfaceTypeDescription
- Returns:
true
if this class is a sealed class that only permitts a specified range of subclasses.
-
iterator
public java.util.Iterator<TypeDefinition> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<TypeDefinition>
-
hashCode
@Enhance("hashCode") public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-