Class TypeDescription.Generic.OfNonGenericType.ForLoadedType

    • Constructor Detail

      • ForLoadedType

        public ForLoadedType​(java.lang.Class<?> type)
        Creates a new description of a generic type of a loaded type.
        Parameters:
        type - The represented type.
      • ForLoadedType

        protected ForLoadedType​(java.lang.Class<?> type,
                                TypeDescription.Generic.AnnotationReader annotationReader)
        /** Creates a new description of a generic type of a loaded type.
        Parameters:
        type - The represented type.
        annotationReader - The annotation reader to query for the non-generic type's annotations.
    • Method Detail

      • asErasure

        public TypeDescription asErasure()
        Description copied from interface: TypeDefinition
        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.
      • 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.