Package net.bytebuddy.description.type
Class TypeDescription.AbstractBase.OfSimpleType
- java.lang.Object
-
- net.bytebuddy.description.ModifierReviewable.AbstractBase
-
- net.bytebuddy.description.TypeVariableSource.AbstractBase
-
- net.bytebuddy.description.type.TypeDescription.AbstractBase
-
- net.bytebuddy.description.type.TypeDescription.AbstractBase.OfSimpleType
-
- 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:
InstrumentedType.Default
,InstrumentedType.Frozen
,TypeDescription.AbstractBase.OfSimpleType.WithDelegation
,TypeDescription.ForPackageDescription
,TypeDescription.Latent
,TypePool.Default.LazyTypeDescription
- Enclosing class:
- TypeDescription.AbstractBase
public abstract static class TypeDescription.AbstractBase.OfSimpleType extends TypeDescription.AbstractBase
An adapter implementation of aTypeDescription
that describes any type that is not an array or a primitive type.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TypeDescription.AbstractBase.OfSimpleType.WithDelegation
An implementation of a type description that delegates all properties but the type's name to a delegate.-
Nested classes/interfaces inherited from class net.bytebuddy.description.type.TypeDescription.AbstractBase
TypeDescription.AbstractBase.OfSimpleType
-
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 inherited from class net.bytebuddy.description.type.TypeDescription.AbstractBase
RAW_TYPES
-
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 OfSimpleType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCanonicalName()
Returns the canonical name of this type if it exists.TypeDescription
getComponentType()
Returns the component type of this type.java.lang.String
getDescriptor()
Returns the descriptor of this byte code element.java.lang.String
getSimpleName()
Returns the simple internalName of this type.StackSize
getStackSize()
Returns the size of the type described by this instance.boolean
isArray()
Checks if the type described by this entity is an array.boolean
isPrimitive()
Checks if the type described by this entity is a primitive type.-
Methods inherited from class net.bytebuddy.description.type.TypeDescription.AbstractBase
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
-
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.WithRuntimeName
getName
-
Methods inherited from interface net.bytebuddy.description.type.TypeDefinition
getInterfaces, getSuperClass, isRecord
-
Methods inherited from interface net.bytebuddy.description.type.TypeDescription
getDeclaredFields, getDeclaredMethods, getDeclaredTypes, getDeclaringType, getEnclosingMethod, getEnclosingType, getNestHost, getNestMembers, getPackage, getPermittedSubclasses, getRecordComponents, isAnonymousType, isLocalType
-
Methods inherited from interface net.bytebuddy.description.TypeVariableSource
findVariable, getTypeVariables
-
-
-
-
Method Detail
-
isPrimitive
public boolean isPrimitive()
Checks if the type described by this entity is a primitive type.- Returns:
true
if this type description represents a primitive type.
-
isArray
public boolean isArray()
Checks if the type described by this entity is an array.- Returns:
true
if this type description represents an array.
-
getComponentType
public TypeDescription getComponentType()
Returns the component type of this type.
Only non-generic types (
TypeDefinition.Sort.NON_GENERIC
) and generic array typesTypeDefinition.Sort.GENERIC_ARRAY
) define a component type. For other types, anIllegalStateException
is thrown.- Returns:
- The component type of this type or
null
if this type does not represent an array type.
-
getDescriptor
public java.lang.String getDescriptor()
Returns the descriptor of this byte code element.- Returns:
- The descriptor of this byte code element.
-
getCanonicalName
public java.lang.String getCanonicalName()
Returns the canonical name of this type if it exists.- Returns:
- The canonical name of this type. Might be
null
.
-
getSimpleName
public java.lang.String getSimpleName()
Returns the simple internalName of this type.- Returns:
- The simple internalName of this type.
-
getStackSize
public StackSize getStackSize()
Returns the size of the type described by this instance. Wildcard types (TypeDefinition.Sort.WILDCARD
do not have a well-defined a stack size and cause anIllegalStateException
to be thrown.- Returns:
- The size of the type described by this instance.
-
-