Class TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution.Raw.RawAnnotatedType

    • Field Detail

      • typePool

        private final TypePool typePool
        The type pool to use.
      • typePath

        private final java.lang.String typePath
        The type's type path.
      • typeDescription

        private final TypeDescription typeDescription
        The represented non-generic type.
    • Constructor Detail

      • RawAnnotatedType

        protected RawAnnotatedType​(TypePool typePool,
                                   java.lang.String typePath,
                                   java.util.Map<java.lang.String,​java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>> annotationTokens,
                                   TypeDescription typeDescription)
        Creates a new raw annotated type.
        Parameters:
        typePool - The type pool to use.
        typePath - The type's type path.
        annotationTokens - A mapping of this type's type annotations.
        typeDescription - The represented non-generic type.
    • Method Detail

      • of

        protected static TypeDescription.Generic of​(TypePool typePool,
                                                    java.util.Map<java.lang.String,​java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>> annotationTokens,
                                                    java.lang.String descriptor)
        Creates a new raw annotated type.
        Parameters:
        typePool - The type pool to use.
        annotationTokens - A mapping of this type's type annotations.
        descriptor - The descriptor of the represented non-generic type.
        Returns:
        An annotated non-generic type.
      • 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.
      • 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.