Interface Description

All Known Implementing Classes:
ClassDescription, MethodDescription, ParameterDescription

public sealed interface Description permits ClassDescription, MethodDescription, ParameterDescription

The common interface of all Description types.

A Description is, as the name says, a description of a class, method or parameter, similar to how java.lang.reflect works.

See Also:
  • Method Details

    • annotations

      @NotNull @NotNull Collection<Annotation> annotations()
      a possibly-empty Collection of all Annotations this element is annotated with.
    • annotation

      @NotNull default <T extends Annotation> @NotNull Optional<T> annotation(@NotNull @NotNull Class<T> type)
      Gets this element's Annotation for the specified type if such an annotation is present
      Parameters:
      type - the type of the annotation to get
      Returns:
      an Optional holding the Annotation if present at this element or else an empty Optional