Class TypeDescription.ArrayProjection

    • Constructor Detail

      • ArrayProjection

        protected ArrayProjection​(TypeDescription componentType,
                                  int arity)
        Creates a new array projection.
        Parameters:
        componentType - The base component type of the array which is itself not an array.
        arity - The arity of this array.
    • Method Detail

      • of

        public static TypeDescription of​(TypeDescription componentType)
        Creates an array projection of an arity of one.
        Parameters:
        componentType - The component type of the array.
        Returns:
        A projection of the component type as an array of the given value with an arity of one.
      • of

        public static TypeDescription of​(TypeDescription componentType,
                                         int arity)
        Creates an array projection.
        Parameters:
        componentType - The component type of the array.
        arity - The arity of this array.
        Returns:
        A projection of the component type as an array of the given value with the supplied arity.
      • isArray

        public boolean isArray()
        Description copied from interface: TypeDefinition
        Checks if the type described by this entity is an array.
        Returns:
        true if this type description represents an array.
      • isPrimitive

        public boolean isPrimitive()
        Description copied from interface: TypeDefinition
        Checks if the type described by this entity is a primitive type.
        Returns:
        true if this type description represents a primitive type.
      • getEnclosingMethod

        public MethodDescription getEnclosingMethod()
        Description copied from interface: TypeDescription
        Returns a description of the method that encloses this type. If this method is not enclosed by any type or is enclosed by the type initializer, null is returned by this method.
        Returns:
        A description of the enclosing method of this type or null if there is no such method.
      • getEnclosingType

        public TypeDescription getEnclosingType()
        Description copied from interface: TypeDescription
        Returns a description of this type's enclosing type if any.
        Returns:
        A description of the enclosing type of this type or null if there is no such type.
      • getDeclaredTypes

        public TypeList getDeclaredTypes()
        Description copied from interface: TypeDescription
        Returns a list of types that are declared by this type excluding anonymous classes.
        Returns:
        A list of types that are declared within this type.
      • getSimpleName

        public java.lang.String getSimpleName()
        Description copied from interface: TypeDescription
        Returns the simple internalName of this type.
        Returns:
        The simple internalName of this type.
      • getCanonicalName

        public java.lang.String getCanonicalName()
        Description copied from interface: TypeDescription
        Returns the canonical name of this type if it exists.
        Returns:
        The canonical name of this type. Might be null.
      • isAnonymousClass

        public boolean isAnonymousClass()
        Description copied from interface: TypeDescription
        Checks if this type description represents an anonymous type.
        Returns:
        true if this type description represents an anonymous type.
      • isLocalClass

        public boolean isLocalClass()
        Description copied from interface: TypeDescription
        Checks if this type description represents a local type.
        Returns:
        true if this type description represents a local type.
      • isMemberClass

        public boolean isMemberClass()
        Description copied from interface: TypeDescription
        Checks if this type description represents a member type.
        Returns:
        true if this type description represents a member type.
      • getStackSize

        public StackSize getStackSize()
        Description copied from interface: TypeDefinition
        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.
      • getDeclaredAnnotations

        public AnnotationList getDeclaredAnnotations()
        Description copied from interface: AnnotationSource
        Returns a list of annotations that are declared by this instance.
        Returns:
        A list of declared annotations.
      • getPackage

        public PackageDescription getPackage()
        Description copied from interface: TypeDescription
        Returns the package internalName of the type described by this instance.
        Returns:
        The package internalName of the type described by this instance.
      • getName

        public java.lang.String getName()
        Description copied from interface: NamedElement.WithRuntimeName
        Returns the internalName of this byte code element.
        Returns:
        The internalName of this byte code element as visible from within a running Java application.
      • getDescriptor

        public java.lang.String getDescriptor()
        Description copied from interface: ByteCodeElement
        Returns the descriptor of this byte code element.
        Returns:
        The descriptor of this byte code element.
      • getDeclaringType

        public TypeDescription getDeclaringType()
        Description copied from interface: DeclaredByType
        Returns the declaring type of this instance.
        Returns:
        The declaring type or null if no such type exists.
      • getModifiers

        public int getModifiers()
        Description copied from interface: ModifierReviewable
        Returns the modifier that is described by this object.
        Returns:
        The modifier that is described by this object.
      • getTypeVariables

        public TypeList.Generic getTypeVariables()
        Description copied from interface: TypeVariableSource
        Returns the type variables that are declared by this element.
        Returns:
        The type variables that are declared by this element.