Interface AnnotationValueResolver

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

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 String member, @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 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 String member, @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 String member, @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 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 String member)
      The value of the given annotation member as a Class.
      Parameters:
      member - The annotation member
      Returns:
      An Optional class
    • classValues

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

      @NonNull Class<?>[] classValues(@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 AnnotationClassValue<?>[] annotationClassValues(@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 String member)
      The AnnotationClassValue instance for the given member.
      Parameters:
      member - The annotation member
      Returns:
      An annotation class value
    • intValue

      OptionalInt intValue(@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 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

      Optional<Character> charValue(@NonNull String member)
      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 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 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 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 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 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 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 String[] stringValues(@NonNull String member)
      The string values for the given member.
      Parameters:
      member - The annotation member
      Returns:
      An array of String
    • stringValues

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

      @NonNull boolean[] booleanValues(@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 boolean[] booleanValues()
      The boolean[] value for the given member.
      Returns:
      An array of boolean
      Since:
      3.0.0
    • byteValues

      @NonNull byte[] byteValues(@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 byte[] byteValues()
      The byte[] value for the given member.
      Returns:
      An array of byte
      Since:
      3.0.0
    • charValues

      @NonNull char[] charValues(@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 char[] charValues()
      The char[] value for the given member.
      Returns:
      An array of char
      Since:
      3.0.0
    • intValues

      @NonNull int[] intValues(@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 int[] intValues()
      The int[] value for the given member.
      Returns:
      An array of int
      Since:
      3.0.0
    • doubleValues

      @NonNull double[] doubleValues(@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 double[] doubleValues()
      The double[] value for the given member.
      Returns:
      An array of double
      Since:
      3.0.0
    • longValues

      @NonNull long[] longValues(@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 long[] longValues()
      The long[] value for the given member.
      Returns:
      An array of long
      Since:
      3.0.0
    • floatValues

      @NonNull float[] floatValues(@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 float[] floatValues()
      The float[] value for the given member.
      Returns:
      An array of float
      Since:
      3.0.0
    • shortValues

      @NonNull short[] shortValues(@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 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 String member, @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