Package io.micronaut.core.annotation
Interface AnnotationValueResolver
- All Superinterfaces:
ValueResolver<CharSequence>
- All Known Implementing Classes:
AnnotationValue
,EvaluatedAnnotationValue
Interface for types that resolve annotation values.
- Since:
- 1.0.3
- Author:
- graemerocher
-
Method Summary
Modifier and TypeMethodDescriptionannotationClassValue
(@NonNull String member) TheAnnotationClassValue
instance for the given member.annotationClassValues
(@NonNull String member) TheAnnotationClassValue
instances for the given member.The Boolean value of the given member.booleanValue
(@NonNull String member) The boolean value of the given member.default @io.micronaut.core.annotation.NonNull boolean[]
The boolean[] value for the given member.@io.micronaut.core.annotation.NonNull boolean[]
booleanValues
(@NonNull String member) The boolean[] value for the given member.The byte value of the given member.The byte value of the given member.default @io.micronaut.core.annotation.NonNull byte[]
The byte[] value for the given member.@io.micronaut.core.annotation.NonNull byte[]
byteValues
(@NonNull String member) The byte[] value for the given member.The char value of the given member.The char value of the given member.default @io.micronaut.core.annotation.NonNull char[]
The char[] value for the given member.@io.micronaut.core.annotation.NonNull char[]
charValues
(@NonNull String member) The char[] value for the given member.The value of the annotation as a Class.classValue
(@NonNull String member) The value of the given annotation member as a Class.classValue
(@NonNull String member, @NonNull Class<T> requiredType) The value of the given annotation member as a Class.The value of the annotation as a Class.classValues
(@NonNull String member) The value of the given annotation member as a Class.default OptionalDouble
The double value of the given member.doubleValue
(@NonNull String member) The double value of the given member.default @io.micronaut.core.annotation.NonNull double[]
The double[] value for the given member.@io.micronaut.core.annotation.NonNull double[]
doubleValues
(@NonNull String member) The double[] value for the given member.Return the enum value of the given member of the given enum type.Return the enum value of the given member of the given enum type.default <E extends Enum>
E[]enumValues
(@NonNull Class<E> enumType) Return the enum value of the given member of the given enum type.<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.enumValuesSet
(@NonNull String member, @NonNull Class<E> enumType) Return the enum value of the given member of the given enum type.The float value of the given member.floatValue
(@NonNull String member) The double value of the given member.default @io.micronaut.core.annotation.NonNull float[]
The float[] value for the given member.@io.micronaut.core.annotation.NonNull float[]
floatValues
(@NonNull String member) The float[] value for the given member.default OptionalInt
intValue()
The integer value of the given member.The integer value of the given member.default @io.micronaut.core.annotation.NonNull int[]
The int[] value for the given member.@io.micronaut.core.annotation.NonNull int[]
The int[] value for the given member.default boolean
isFalse()
boolean
boolean
isPresent
(CharSequence member) Is the given member present.default boolean
isTrue()
boolean
default OptionalLong
The long value of the given member.The long value of the given member.default @io.micronaut.core.annotation.NonNull long[]
The long[] value for the given member.@io.micronaut.core.annotation.NonNull long[]
longValues
(@NonNull String member) The long[] value for the given member.The integer value of the given member.shortValue
(@NonNull String member) The short value of the given member.default @io.micronaut.core.annotation.NonNull short[]
The short[] value for the given member.@io.micronaut.core.annotation.NonNull short[]
shortValues
(@NonNull String member) The short[] value for the given member.The string value of the given member.stringValue
(@NonNull String member) The string value of the given member.The string values for the given member.stringValues
(@NonNull String member) The string values for the given member.Methods inherited from interface io.micronaut.core.value.ValueResolver
get, get, get, get
-
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 memberenumType
- The required type- Returns:
- An
Optional
of the enum value
-
enumValue
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 memberenumType
- 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 memberenumType
- The required type- Returns:
- An
Optional
of the enum value
-
enumValues
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
The value of the annotation as a Class.- Returns:
- An
Optional
class
-
classValue
The value of the given annotation member as a Class.- Parameters:
member
- The annotation member- Returns:
- An
Optional
class
-
classValues
The value of the annotation as a Class.- Returns:
- An array of classes
-
classValues
The value of the given annotation member as a Class.- Parameters:
member
- The annotation member- Returns:
- An array of classes
-
annotationClassValues
TheAnnotationClassValue
instances for the given member. UnlikeclassValues(String)
this may include classes that are no the classpath.- Parameters:
member
- The annotation member- Returns:
- An array of class values
-
annotationClassValue
TheAnnotationClassValue
instance for the given member.- Parameters:
member
- The annotation member- Returns:
- An annotation class value
-
intValue
The integer value of the given member.- Parameters:
member
- The annotation member- Returns:
- An
OptionalInt
-
byteValue
The byte value of the given member. -
byteValue
The byte value of the given member. -
charValue
The char value of the given member. -
charValue
The char value of the given member. -
intValue
The integer value of the given member.- Returns:
- An
OptionalInt
-
longValue
The long value of the given member.- Parameters:
member
- The annotation member- Returns:
- An
OptionalLong
-
longValue
The long value of the given member.- Returns:
- An
OptionalLong
-
shortValue
The short value of the given member. -
shortValue
The integer value of the given member.- Returns:
- An
Optional
of
-
doubleValue
The double value of the given member.- Parameters:
member
- The annotation member- Returns:
- An
OptionalDouble
-
floatValue
The float value of the given member. -
floatValue
The double value of the given member.- Parameters:
member
- The annotation member- Returns:
- An
OptionalDouble
- Since:
- 3.0.0
-
doubleValue
The double value of the given member.- Returns:
- An
OptionalDouble
-
stringValue
The string value of the given member.- Parameters:
member
- The annotation member- Returns:
- An
OptionalInt
-
stringValue
The string value of the given member.- Returns:
- An
OptionalInt
-
booleanValue
The boolean value of the given member.- Parameters:
member
- The annotation member- Returns:
- An
Optional
boolean
-
booleanValue
The Boolean value of the given member.- Returns:
- An
Optional
boolean
-
stringValues
The string values for the given member.- Parameters:
member
- The annotation member- Returns:
- An array of
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
The boolean[] value for the given member.- Returns:
- An array of
boolean
- Since:
- 3.0.0
-
byteValues
The byte[] value for the given member.- Parameters:
member
- The annotation member- Returns:
- An array of
byte
- Since:
- 3.0.0
-
byteValues
The byte[] value for the given member.- Returns:
- An array of
byte
- Since:
- 3.0.0
-
charValues
The char[] value for the given member.- Parameters:
member
- The annotation member- Returns:
- An array of
char
- Since:
- 3.0.0
-
charValues
The char[] value for the given member.- Returns:
- An array of
char
- Since:
- 3.0.0
-
intValues
The int[] value for the given member.- Parameters:
member
- The annotation member- Returns:
- An array of
int
- Since:
- 3.0.0
-
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
The double[] value for the given member.- Returns:
- An array of
double
- Since:
- 3.0.0
-
longValues
The long[] value for the given member.- Parameters:
member
- The annotation member- Returns:
- An array of
long
- Since:
- 3.0.0
-
longValues
The long[] value for the given member.- Returns:
- An array of
long
- Since:
- 3.0.0
-
floatValues
The float[] value for the given member.- Parameters:
member
- The annotation member- Returns:
- An array of
float
- Since:
- 3.0.0
-
floatValues
The float[] value for the given member.- Returns:
- An array of
float
- Since:
- 3.0.0
-
shortValues
The short[] value for the given member.- Parameters:
member
- The annotation member- Returns:
- An array of
short
- Since:
- 3.0.0
-
shortValues
The short[] value for the given member.- Returns:
- An array of
short
- Since:
- 3.0.0
-
isPresent
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
- 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
- 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 memberrequiredType
- The required type- Returns:
- An
Optional
class
-
getValues
- Returns:
- The attribute values
-