Interface AnnotationValueResolver

All Superinterfaces:
ValueResolver<CharSequence>
All Known Implementing Classes:
AnnotationValue, EvaluatedAnnotationValue

public interface AnnotationValueResolver extends ValueResolver<CharSequence>
Interface for types that resolve annotation values.
Since:
1.0.3
Author:
graemerocher
  • Method Details

    • enumValue

      <E extends Enum> Optional<E> enumValue(@NonNull @NonNull String member, @NonNull @NonNull Class<E> enumType)
      Return the enum value of the given member of the given enum type.
      Type Parameters:
      E - The enum type
      Parameters:
      member - The annotation member
      enumType - The required type
      Returns:
      An Optional of the enum value
    • enumValue

      default <E extends Enum> Optional<E> enumValue(@NonNull @NonNull Class<E> enumType)
      Return the enum value of the given member of the given enum type.
      Type Parameters:
      E - The enum type
      Parameters:
      enumType - The required type
      Returns:
      An Optional of the enum value
    • enumValues

      <E extends Enum> E[] enumValues(@NonNull @NonNull String member, @NonNull @NonNull Class<E> enumType)
      Return the enum value of the given member of the given enum type.
      Type Parameters:
      E - The enum type
      Parameters:
      member - The annotation member
      enumType - The required type
      Returns:
      An Optional of the enum value
    • enumValuesSet

      default <E extends Enum<E>> EnumSet<E> enumValuesSet(@NonNull @NonNull String member, @NonNull @NonNull Class<E> enumType)
      Return the enum value of the given member of the given enum type.
      Type Parameters:
      E - The enum type
      Parameters:
      member - The annotation member
      enumType - The required type
      Returns:
      An Optional of the enum value
    • enumValues

      default <E extends Enum> E[] enumValues(@NonNull @NonNull Class<E> enumType)
      Return the enum value of the given member of the given enum type.
      Type Parameters:
      E - The enum type
      Parameters:
      enumType - The required type
      Returns:
      An Optional of the enum value
    • classValue

      default Optional<Class<?>> classValue()
      The value of the annotation as a Class.
      Returns:
      An Optional class
    • classValue

      Optional<Class<?>> classValue(@NonNull @NonNull String member)
      The value of the given annotation member as a Class.
      Parameters:
      member - The annotation member
      Returns:
      An Optional class
    • classValues

      @NonNull default @NonNull Class<?>[] classValues()
      The value of the annotation as a Class.
      Returns:
      An array of classes
    • classValues

      @NonNull @NonNull Class<?>[] classValues(@NonNull @NonNull String member)
      The value of the given annotation member as a Class.
      Parameters:
      member - The annotation member
      Returns:
      An array of classes
    • annotationClassValues

      @NonNull @NonNull AnnotationClassValue<?>[] annotationClassValues(@NonNull @NonNull String member)
      The AnnotationClassValue instances for the given member. Unlike classValues(String) this may include classes that are no the classpath.
      Parameters:
      member - The annotation member
      Returns:
      An array of class values
    • annotationClassValue

      Optional<AnnotationClassValue<?>> annotationClassValue(@NonNull @NonNull String member)
      The AnnotationClassValue instance for the given member.
      Parameters:
      member - The annotation member
      Returns:
      An annotation class value
    • intValue

      OptionalInt intValue(@NonNull @NonNull String member)
      The integer value of the given member.
      Parameters:
      member - The annotation member
      Returns:
      An OptionalInt
    • byteValue

      default Optional<Byte> byteValue()
      The byte value of the given member.
      Returns:
      An Optional of Byte
      Since:
      3.0.0
    • byteValue

      Optional<Byte> byteValue(@NonNull @NonNull String member)
      The byte value of the given member.
      Parameters:
      member - The annotation member
      Returns:
      An Optional of Byte
      Since:
      3.0.0
    • charValue

      default Optional<Character> charValue()
      The char value of the given member.
      Returns:
      An Optional of Character
      Since:
      3.0.0
    • charValue

      The char value of the given member.
      Parameters:
      member - The annotation member
      Returns:
      An Optional of Character
      Since:
      3.0.0
    • intValue

      default OptionalInt intValue()
      The integer value of the given member.
      Returns:
      An OptionalInt
    • longValue

      OptionalLong longValue(@NonNull @NonNull String member)
      The long value of the given member.
      Parameters:
      member - The annotation member
      Returns:
      An OptionalLong
    • longValue

      default OptionalLong longValue()
      The long value of the given member.
      Returns:
      An OptionalLong
    • shortValue

      Optional<Short> shortValue(@NonNull @NonNull String member)
      The short value of the given member.
      Parameters:
      member - The annotation member
      Returns:
      An Optional of Short
    • shortValue

      default Optional<Short> shortValue()
      The integer value of the given member.
      Returns:
      An Optional of
    • doubleValue

      OptionalDouble doubleValue(@NonNull @NonNull String member)
      The double value of the given member.
      Parameters:
      member - The annotation member
      Returns:
      An OptionalDouble
    • floatValue

      default Optional<Float> floatValue()
      The float value of the given member.
      Returns:
      An Optional of Float
      Since:
      3.0.0
    • floatValue

      Optional<Float> floatValue(@NonNull @NonNull String member)
      The double value of the given member.
      Parameters:
      member - The annotation member
      Returns:
      An OptionalDouble
      Since:
      3.0.0
    • doubleValue

      default OptionalDouble doubleValue()
      The double value of the given member.
      Returns:
      An OptionalDouble
    • stringValue

      Optional<String> stringValue(@NonNull @NonNull String member)
      The string value of the given member.
      Parameters:
      member - The annotation member
      Returns:
      An OptionalInt
    • stringValue

      default Optional<String> stringValue()
      The string value of the given member.
      Returns:
      An OptionalInt
    • booleanValue

      Optional<Boolean> booleanValue(@NonNull @NonNull String member)
      The boolean value of the given member.
      Parameters:
      member - The annotation member
      Returns:
      An Optional boolean
    • booleanValue

      default Optional<Boolean> booleanValue()
      The Boolean value of the given member.
      Returns:
      An Optional boolean
    • stringValues

      @NonNull @NonNull String[] stringValues(@NonNull @NonNull String member)
      The string values for the given member.
      Parameters:
      member - The annotation member
      Returns:
      An array of String
    • stringValues

      @NonNull default @NonNull String[] stringValues()
      The string values for the given member.
      Returns:
      An array of String
    • booleanValues

      @NonNull @io.micronaut.core.annotation.NonNull boolean[] booleanValues(@NonNull @NonNull String member)
      The boolean[] value for the given member.
      Parameters:
      member - The annotation member
      Returns:
      An array of boolean
      Since:
      3.0.0
    • booleanValues

      @NonNull default @io.micronaut.core.annotation.NonNull boolean[] booleanValues()
      The boolean[] value for the given member.
      Returns:
      An array of boolean
      Since:
      3.0.0
    • byteValues

      @NonNull @io.micronaut.core.annotation.NonNull byte[] byteValues(@NonNull @NonNull String member)
      The byte[] value for the given member.
      Parameters:
      member - The annotation member
      Returns:
      An array of byte
      Since:
      3.0.0
    • byteValues

      @NonNull default @io.micronaut.core.annotation.NonNull byte[] byteValues()
      The byte[] value for the given member.
      Returns:
      An array of byte
      Since:
      3.0.0
    • charValues

      @NonNull @io.micronaut.core.annotation.NonNull char[] charValues(@NonNull @NonNull String member)
      The char[] value for the given member.
      Parameters:
      member - The annotation member
      Returns:
      An array of char
      Since:
      3.0.0
    • charValues

      @NonNull default @io.micronaut.core.annotation.NonNull char[] charValues()
      The char[] value for the given member.
      Returns:
      An array of char
      Since:
      3.0.0
    • intValues

      @NonNull @io.micronaut.core.annotation.NonNull int[] intValues(@NonNull @NonNull String member)
      The int[] value for the given member.
      Parameters:
      member - The annotation member
      Returns:
      An array of int
      Since:
      3.0.0
    • intValues

      @NonNull default @io.micronaut.core.annotation.NonNull int[] intValues()
      The int[] value for the given member.
      Returns:
      An array of int
      Since:
      3.0.0
    • doubleValues

      @NonNull @io.micronaut.core.annotation.NonNull double[] doubleValues(@NonNull @NonNull String member)
      The double[] value for the given member.
      Parameters:
      member - The annotation member
      Returns:
      An array of double
      Since:
      3.0.0
    • doubleValues

      @NonNull default @io.micronaut.core.annotation.NonNull double[] doubleValues()
      The double[] value for the given member.
      Returns:
      An array of double
      Since:
      3.0.0
    • longValues

      @NonNull @io.micronaut.core.annotation.NonNull long[] longValues(@NonNull @NonNull String member)
      The long[] value for the given member.
      Parameters:
      member - The annotation member
      Returns:
      An array of long
      Since:
      3.0.0
    • longValues

      @NonNull default @io.micronaut.core.annotation.NonNull long[] longValues()
      The long[] value for the given member.
      Returns:
      An array of long
      Since:
      3.0.0
    • floatValues

      @NonNull @io.micronaut.core.annotation.NonNull float[] floatValues(@NonNull @NonNull String member)
      The float[] value for the given member.
      Parameters:
      member - The annotation member
      Returns:
      An array of float
      Since:
      3.0.0
    • floatValues

      @NonNull default @io.micronaut.core.annotation.NonNull float[] floatValues()
      The float[] value for the given member.
      Returns:
      An array of float
      Since:
      3.0.0
    • shortValues

      @NonNull @io.micronaut.core.annotation.NonNull short[] shortValues(@NonNull @NonNull String member)
      The short[] value for the given member.
      Parameters:
      member - The annotation member
      Returns:
      An array of short
      Since:
      3.0.0
    • shortValues

      @NonNull default @io.micronaut.core.annotation.NonNull short[] shortValues()
      The short[] value for the given member.
      Returns:
      An array of short
      Since:
      3.0.0
    • isPresent

      boolean isPresent(CharSequence member)
      Is the given member present.
      Parameters:
      member - The member
      Returns:
      True if it is
    • isTrue

      default boolean isTrue()
      Returns:
      Is the value of the annotation true.
    • isTrue

      boolean isTrue(String member)
      Parameters:
      member - The member
      Returns:
      Is the value of the annotation true.
    • isFalse

      default boolean isFalse()
      Returns:
      Is the value of the annotation true.
    • isFalse

      boolean isFalse(String member)
      Parameters:
      member - The member
      Returns:
      Is the value of the annotation true.
    • classValue

      <T> Optional<Class<? extends T>> classValue(@NonNull @NonNull String member, @NonNull @NonNull Class<T> requiredType)
      The value of the given annotation member as a Class.
      Type Parameters:
      T - The required type
      Parameters:
      member - The annotation member
      requiredType - The required type
      Returns:
      An Optional class
    • getValues

      Returns:
      The attribute values