Interface WildcardElement

  • All Superinterfaces:
    io.micronaut.core.annotation.AnnotatedElement, io.micronaut.core.annotation.AnnotationMetadata, io.micronaut.core.annotation.AnnotationMetadataDelegate, io.micronaut.core.annotation.AnnotationMetadataProvider, io.micronaut.core.annotation.AnnotationSource, ClassElement, io.micronaut.core.naming.Described, Element, io.micronaut.core.naming.Named, TypedElement

    public interface WildcardElement
    extends ClassElement
    Represents a wildcard, for example List<?>. For compatibility, this wildcard acts like its first upper bound when used as a ClassElement.
    Since:
    3.1.0
    • Method Detail

      • getUpperBounds

        @NonNull
        java.util.List<? extends ClassElement> getUpperBounds()
        Returns:
        The upper bounds of this wildcard. Never empty. To match this wildcard, a type must be assignable to all upper bounds (must extend all upper bounds).
      • getLowerBounds

        @NonNull
        java.util.List<? extends ClassElement> getLowerBounds()
        Returns:
        The lower bounds of this wildcard. May be empty. To match this wildcard, a type must be assignable from all lower bounds (must be a supertype of all lower bounds).