Class TypePool.Default.LazyTypeDescription.LazyMethodDescription.LazyParameterizedReceiverType

    • Field Detail

      • typeDescription

        private final TypeDescription typeDescription
        The erasure of the type to be represented as a parameterized receiver type.
    • Constructor Detail

      • LazyParameterizedReceiverType

        protected LazyParameterizedReceiverType()
        Creates a new lazy parameterized receiver type of the method's declaring type.
      • LazyParameterizedReceiverType

        protected LazyParameterizedReceiverType​(TypeDescription typeDescription)
        Creates a new lazy parameterized receiver type of the supplied receiver type.
        Parameters:
        typeDescription - The erasure of the type to be represented as a parameterized receiver type.
    • Method Detail

      • getTypeArguments

        public TypeList.Generic getTypeArguments()

        Returns the type arguments of this type.

        Parameters are only well-defined for parameterized types (TypeDefinition.Sort.PARAMETERIZED). For all other types, this method throws an IllegalStateException.

        Returns:
        A list of this type's type parameters.
      • getOwnerType

        public TypeDescription.Generic getOwnerType()

        Returns the owner type of this type. A type's owner type describes a nested type's declaring type. If it exists, the returned type can be a non-generic or parameterized type. If a class has no declaring type, null is returned.

        An owner type is only well-defined for parameterized types (TypeDefinition.Sort.PARAMETERIZED), for non-generic types (TypeDefinition.Sort.NON_GENERIC) and for generic arrays (TypeDefinition.Sort.GENERIC_ARRAY). For all other types, this method throws an IllegalStateException.

        Returns:
        This type's owner type or null if no owner type exists.
      • getDeclaredAnnotations

        public AnnotationList getDeclaredAnnotations()
        Returns a list of annotations that are declared by this instance.
        Returns:
        A list of declared annotations.
      • getTypePath

        private java.lang.String getTypePath()
        Returns the type path for this type.
        Returns:
        This type's type path.
      • asErasure

        public TypeDescription asErasure()
        Returns the erasure of this type. Wildcard types (TypeDefinition.Sort.WILDCARD) do not have a well-defined erasure and cause an IllegalStateException to be thrown.
        Returns:
        The erasure of this type.