Interface RouteRegistry.Mapping

All Known Implementing Classes:
RouteRegistry.EndpointMapping, RouteRegistry.ShareMapping
Enclosing class:
RouteRegistry

public static interface RouteRegistry.Mapping
A universal interface for mappings.

Provides default methods for checking and retrieving metadata about requirements indexed by annotation types.

Since:
3.0.3-SNAPSHOT
  • Method Summary

    Modifier and Type
    Method
    Description
    default <A extends Annotation, T>
    @Unmodifiable T
    getRequirements(@NotNull Class<A> annotation)
    Retrieves a value associated with a specific annotation's default key ("value").
    default <A extends Annotation, T>
    @Unmodifiable T
    getRequirements(@NotNull Class<A> annotation, @NotNull String key)
    Retrieves a value associated with a specific annotation's requirements key.
    default <A extends Annotation>
    boolean
    isPresent(@NotNull Class<A> annotation)
    Checks whether a specific annotation is present in the mapping's requirements.
    default <A extends Annotation>
    boolean
    isPresent(@NotNull Class<A> annotation, @NotNull String key)
    Checks whether a specific key within an annotation's requirements is present.
  • Method Details

    • isPresent

      default <A extends Annotation> boolean isPresent(@NotNull @NotNull Class<A> annotation)
      Checks whether a specific annotation is present in the mapping's requirements.
      Parameters:
      annotation - The annotation class to check for.
      Returns:
      true if the annotation is present, false otherwise.
    • isPresent

      default <A extends Annotation> boolean isPresent(@NotNull @NotNull Class<A> annotation, @NotNull @NotNull String key)
      Checks whether a specific key within an annotation's requirements is present.
      Parameters:
      annotation - The annotation class to check for.
      key - The specific key to check within the annotation's requirements.
      Returns:
      true if the key is present, false otherwise.
    • getRequirements

      default <A extends Annotation, T> @Unmodifiable T getRequirements(@NotNull @NotNull Class<A> annotation)
      Retrieves a value associated with a specific annotation's default key ("value").
      Parameters:
      annotation - The annotation class to retrieve the value from.
      Returns:
      The value associated with the annotation's default key, or null if not present.
    • getRequirements

      default <A extends Annotation, T> @Unmodifiable T getRequirements(@NotNull @NotNull Class<A> annotation, @NotNull @NotNull String key)
      Retrieves a value associated with a specific annotation's requirements key.
      Parameters:
      annotation - The annotation class to retrieve the value from.
      key - The specific key to retrieve from the annotation's requirements.
      Returns:
      The value associated with the given key, or null if not present.