Class TypeDescription.AbstractBase.OfSimpleType

All Implemented Interfaces:
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 a TypeDescription that describes any type that is not an array or a primitive type.
  • Constructor Details

    • OfSimpleType

      public OfSimpleType()
  • Method Details

    • 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

      @MaybeNull public TypeDescription getComponentType()

      Returns the component type of this type.

      Only non-generic types (TypeDefinition.Sort.NON_GENERIC) and generic array types TypeDefinition.Sort.GENERIC_ARRAY) define a component type. For other types, an IllegalStateException is thrown.

      Returns:
      The component type of this type or null if this type does not represent an array type.
    • getDescriptor

      public String getDescriptor()
      Returns the descriptor of this byte code element.
      Returns:
      The descriptor of this byte code element.
    • getCanonicalName

      @MaybeNull public String getCanonicalName()
      Returns the canonical name of this type if it exists.
      Returns:
      The canonical name of this type. Might be null.
    • getSimpleName

      public String getSimpleName()
      Returns the simple name of this type.
      Returns:
      The simple name 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 an IllegalStateException to be thrown.
      Returns:
      The size of the type described by this instance.