Interface GenericElement

All Superinterfaces:
AnnotatedElement, AnnotationMetadata, AnnotationMetadataDelegate, AnnotationMetadataProvider, AnnotationSource, ClassElement, Described, Element, MutableAnnotationMetadataDelegate<Element>, Named, TypedElement
All Known Subinterfaces:
GenericPlaceholderElement, WildcardElement

public interface GenericElement extends ClassElement
Represents a generic element that can appear as a type argument.
Denis Stepanov
  • Method Details

    • getGenericNativeType

      @NotNull default @NotNull Object getGenericNativeType()
      The native type that represents the generic element. It is expected that the generic element representing 'T extends java.lang.Number` should be equal to the class element `java.lang.Number`. To find matching placeholders we can use this method to match the native generic type.
      The generic native type
    • getGenericTypeAnnotationMetadata

      @NotNull default @NotNull MutableAnnotationMetadataDelegate<AnnotationMetadata> getGenericTypeAnnotationMetadata()
      Returns the type parameter annotations. Added to this generic element by: - The declaration of the type variable ElementType.TYPE_PARAMETER - The use of the type ElementType.TYPE
      the type annotations