- All Superinterfaces:
Annotation
,Comparable<Annotation>
,Prototype.Api
- All Known Implementing Classes:
Qualifier.BuilderBase.QualifierImpl
Represents a qualifier annotation (a specific case of annotations, annotated with
Service.Qualifier
).- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Fluent API builder forQualifier
.static class
Qualifier.BuilderBase<BUILDER extends Qualifier.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends Qualifier> Fluent API builder base forQualifier
. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Qualifier
Represents a qualifier used for injecting name ofService.PerInstance
instances.static final Qualifier
Represents an instance named with the default name: "@default".static final String
The "value
" property name.static final Qualifier
Represents a wildcardService.Named
qualifier. -
Method Summary
Modifier and TypeMethodDescriptiondefault Optional
<Annotation> Typed value of the property "value
".default Optional
<Annotation> annotationValue
(String property) Typed value of a named property.default Optional
<List<Annotation>> Typed value of the property "value
" that is defined as an array.default Optional
<List<Annotation>> annotationValues
(String property) Typed values of a property that is defined as an array.Typed value of the property "value
".booleanValue
(String property) Typed value of a named property.Typed value of the property "value
" that is defined as an array.booleanValues
(String property) Typed values of a property that is defined as an array.static Qualifier.Builder
builder()
Create a new fluent API builder to customize configuration.static Qualifier.Builder
Create a new fluent API builder from an existing instance.Typed value of the property "value
".Typed value of a named property.Typed value of the property "value
" that is defined as an array.byteValues
(String property) Typed values of a property that is defined as an array.Typed value of the property "value
".Typed value of a named property.Typed value of the property "value
" that is defined as an array.charValues
(String property) Typed values of a property that is defined as an array.Typed value of the property "value
".classValue
(String property) Typed value of a named property.Typed value of the property "value
" that is defined as an array.classValues
(String property) Typed values of a property that is defined as an array.static Qualifier
create()
Create a new instance with default values.static Qualifier
create
(Annotation annotation) Creates a qualifier from an annotation.static Qualifier
Creates a qualifier from an annotation.static Qualifier
Creates a qualifier with a value from an annotation.static Qualifier
create
(Class<? extends Annotation> qualifierType) Creates a qualifier from an annotation.static Qualifier
create
(Class<? extends Annotation> qualifierType, String value) Creates a qualifier with a value from an annotation.static Qualifier
createNamed
(Service.Named name) Creates aService.Named
qualifier.static Qualifier
Creates aService.Named
qualifier.static Qualifier
createNamed
(Class<?> className) Creates aService.Named
qualifier from a class name.static Qualifier
createNamed
(String name) Creates aService.Named
qualifier.Typed value of the property "value
".doubleValue
(String property) Typed value of a named property.Typed value of the property "value
" that is defined as an array.doubleValues
(String property) Typed values of a property that is defined as an array.Typed value of the property "value
".Typed value of a named property.enumValues
(Class<T> type) Typed value of the property "value
" that is defined as an array.enumValues
(String property, Class<T> type) Typed values of a property that is defined as an array.Typed value of the property "value
".floatValue
(String property) Typed value of a named property.Typed value of the property "value
" that is defined as an array.floatValues
(String property) Typed values of a property that is defined as an array.Get a value of an annotation property.default boolean
hasMetaAnnotation
(TypeName annotationType) Check ifAnnotationBlueprint.metaAnnotations()
contains an annotation of the provided type.intValue()
Typed value of the property "value
".Typed value of a named property.Typed value of the property "value
" that is defined as an array.Typed values of a property that is defined as an array.Typed value of the property "value
".Typed value of a named property.Typed value of the property "value
" that is defined as an array.longValues
(String property) Typed values of a property that is defined as an array.A list of inherited annotations (from the whole hierarchy).Value of the annotation as an object.objectValue
(String property) Value of the annotation property as an object.Typed value of the property "value
".shortValue
(String property) Typed value of a named property.Typed value of the property "value
" that is defined as an array.shortValues
(String property) Typed values of a property that is defined as an array.Typed value of the property "value
".stringValue
(String property) Typed value of a named property.Typed value of the property "value
" that is defined as an array.stringValues
(String property) Typed values of a property that is defined as an array.typeName()
The type name, e.g.,Objects
-> "java.util.Objects".Typed value of the property "value
".Typed value of a named property.Typed value of the property "value
" that is defined as an array.typeValues
(String property) Typed values of a property that is defined as an array.value()
The value property.values()
Get a key-value of all the annotation properties.Methods inherited from interface java.lang.Comparable
compareTo
-
Field Details
-
CREATE_FOR_NAME
Represents a qualifier used for injecting name ofService.PerInstance
instances. -
DEFAULT_NAMED
Represents an instance named with the default name: "@default". -
WILDCARD_NAMED
Represents a wildcardService.Named
qualifier. -
VALUE_PROPERTY
The "value
" property name.- See Also:
-
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance
- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance with default values.- Returns:
- a new instance
-
create
Creates a qualifier from an annotation.- Parameters:
qualifierType
- the qualifier type- Returns:
- qualifier
-
create
Creates a qualifier with a value from an annotation.- Parameters:
qualifierType
- the qualifier typevalue
- the value property- Returns:
- qualifier
-
create
Creates a qualifier from an annotation.- Parameters:
qualifierType
- the qualifier type- Returns:
- qualifier
-
create
Creates a qualifier with a value from an annotation.- Parameters:
qualifierType
- the qualifier typevalue
- the value property- Returns:
- qualifier
-
create
Creates a qualifier from an annotation.- Parameters:
annotation
- the qualifier annotation- Returns:
- qualifier
-
createNamed
Creates aService.Named
qualifier.- Parameters:
name
- the name- Returns:
- named qualifier
-
createNamed
Creates aService.Named
qualifier.- Parameters:
name
- the name- Returns:
- named qualifier
-
createNamed
Creates aService.Named
qualifier.- Parameters:
name
- the name- Returns:
- named qualifier
-
createNamed
Creates aService.Named
qualifier from a class name.- Parameters:
className
- class whose name will be used- Returns:
- named qualifier
-
typeName
TypeName typeName()The type name, e.g.,Objects
-> "java.util.Objects".- Returns:
- the annotation type name
-
values
Get a key-value of all the annotation properties.- Returns:
- key-value pairs of all the properties present
-
metaAnnotations
List<Annotation> metaAnnotations()A list of inherited annotations (from the whole hierarchy).- Returns:
- list of all annotations declared on the annotation type, or inherited from them
-
value
The value property.- Returns:
- the string value of value property
-
getValue
Get a value of an annotation property.- Parameters:
property
- name of the annotation property- Returns:
- string value of the property
-
objectValue
Value of the annotation as an object. The type can be either String, or any primitive type, orAnnotation
, or list of these.- Returns:
- object value
-
objectValue
Value of the annotation property as an object. The type can be either String, or any primitive type, orAnnotation
, or list of these.- Parameters:
property
- name of the annotation property- Returns:
- object value
-
stringValue
Typed value of the property "value
".- Returns:
- value if present
-
stringValue
Typed value of a named property.- Parameters:
property
- name of the annotation property- Returns:
- value if present
-
stringValues
Typed value of the property "value
" that is defined as an array. This will also work for a single values property.- Returns:
- list of defined values if present
-
stringValues
Typed values of a property that is defined as an array. This will also work for a single values property.- Parameters:
property
- name of the annotation property- Returns:
- list of defined values if present
-
intValue
Typed value of the property "value
".- Returns:
- value if present
-
intValue
Typed value of a named property.- Parameters:
property
- name of the annotation property- Returns:
- value if present
-
intValues
Typed value of the property "value
" that is defined as an array. This will also work for a single values property.- Returns:
- list of defined values if present
-
intValues
Typed values of a property that is defined as an array. This will also work for a single values property.- Parameters:
property
- name of the annotation property- Returns:
- list of defined values if present
-
longValue
Typed value of the property "value
".- Returns:
- value if present
-
longValue
Typed value of a named property.- Parameters:
property
- name of the annotation property- Returns:
- value if present
-
longValues
Typed value of the property "value
" that is defined as an array. This will also work for a single values property.- Returns:
- list of defined values if present
-
longValues
Typed values of a property that is defined as an array. This will also work for a single values property.- Parameters:
property
- name of the annotation property- Returns:
- list of defined values if present
-
booleanValue
Typed value of the property "value
".- Returns:
- value if present
-
booleanValue
Typed value of a named property.- Parameters:
property
- name of the annotation property- Returns:
- value if present
-
booleanValues
Typed value of the property "value
" that is defined as an array. This will also work for a single values property.- Returns:
- list of defined values if present
-
booleanValues
Typed values of a property that is defined as an array. This will also work for a single values property.- Parameters:
property
- name of the annotation property- Returns:
- list of defined values if present
-
byteValue
Typed value of the property "value
".- Returns:
- value if present
-
byteValue
Typed value of a named property.- Parameters:
property
- name of the annotation property- Returns:
- value if present
-
byteValues
Typed value of the property "value
" that is defined as an array. This will also work for a single values property.- Returns:
- list of defined values if present
-
byteValues
Typed values of a property that is defined as an array. This will also work for a single values property.- Parameters:
property
- name of the annotation property- Returns:
- list of defined values if present
-
charValue
Typed value of the property "value
".- Returns:
- value if present
-
charValue
Typed value of a named property.- Parameters:
property
- name of the annotation property- Returns:
- value if present
-
charValues
Typed value of the property "value
" that is defined as an array. This will also work for a single values property.- Returns:
- list of defined values if present
-
charValues
Typed values of a property that is defined as an array. This will also work for a single values property.- Parameters:
property
- name of the annotation property- Returns:
- list of defined values if present
-
shortValue
Typed value of the property "value
".- Returns:
- value if present
-
shortValue
Typed value of a named property.- Parameters:
property
- name of the annotation property- Returns:
- value if present
-
shortValues
Typed value of the property "value
" that is defined as an array. This will also work for a single values property.- Returns:
- list of defined values if present
-
shortValues
Typed values of a property that is defined as an array. This will also work for a single values property.- Parameters:
property
- name of the annotation property- Returns:
- list of defined values if present
-
floatValue
Typed value of the property "value
".- Returns:
- value if present
-
floatValue
Typed value of a named property.- Parameters:
property
- name of the annotation property- Returns:
- value if present
-
floatValues
Typed value of the property "value
" that is defined as an array. This will also work for a single values property.- Returns:
- list of defined values if present
-
floatValues
Typed values of a property that is defined as an array. This will also work for a single values property.- Parameters:
property
- name of the annotation property- Returns:
- list of defined values if present
-
doubleValue
Typed value of the property "value
".- Returns:
- value if present
-
doubleValue
Typed value of a named property.- Parameters:
property
- name of the annotation property- Returns:
- value if present
-
doubleValues
Typed value of the property "value
" that is defined as an array. This will also work for a single values property.- Returns:
- list of defined values if present
-
doubleValues
Typed values of a property that is defined as an array. This will also work for a single values property.- Parameters:
property
- name of the annotation property- Returns:
- list of defined values if present
-
classValue
Typed value of the property "value
".- Returns:
- value if present
-
classValue
Typed value of a named property.- Parameters:
property
- name of the annotation property- Returns:
- value if present
-
classValues
Typed value of the property "value
" that is defined as an array. This will also work for a single values property.- Returns:
- list of defined values if present
-
classValues
Typed values of a property that is defined as an array. This will also work for a single values property.- Parameters:
property
- name of the annotation property- Returns:
- list of defined values if present
-
typeValue
Typed value of the property "value
". Alternative forclassValue()
.- Returns:
- value if present
-
typeValue
Typed value of a named property. Alternative forclassValue(String)
.- Parameters:
property
- name of the annotation property- Returns:
- value if present
-
typeValues
Typed value of the property "value
" that is defined as an array. This will also work for a single values property. Alternative forclassValues()
.- Returns:
- list of defined values if present
-
typeValues
Typed values of a property that is defined as an array. This will also work for a single values property. Alternative forclassValues(String)
.- Parameters:
property
- name of the annotation property- Returns:
- list of defined values if present
-
annotationValue
Typed value of the property "value
".- Returns:
- value if present
-
annotationValue
Typed value of a named property.- Parameters:
property
- name of the annotation property- Returns:
- value if present
-
annotationValues
Typed value of the property "value
" that is defined as an array. This will also work for a single values property.- Returns:
- list of defined values if present
-
annotationValues
Typed values of a property that is defined as an array. This will also work for a single values property.- Parameters:
property
- name of the annotation property- Returns:
- list of defined values if present
-
enumValue
Typed value of the property "value
".- Type Parameters:
T
- type of the enumeration- Parameters:
type
- class of the enumeration- Returns:
- value if present
-
enumValue
Typed value of a named property.- Type Parameters:
T
- type of the enumeration- Parameters:
property
- name of the annotation propertytype
- class of the enumeration- Returns:
- value if present
-
enumValues
Typed value of the property "value
" that is defined as an array. This will also work for a single values property.- Type Parameters:
T
- type of the enumeration- Parameters:
type
- class of the enumeration- Returns:
- list of defined values if present
-
enumValues
Typed values of a property that is defined as an array. This will also work for a single values property.- Type Parameters:
T
- type of the enumeration- Parameters:
property
- name of the annotation propertytype
- class of the enumeration- Returns:
- list of defined values if present
-
hasMetaAnnotation
Check ifAnnotationBlueprint.metaAnnotations()
contains an annotation of the provided type.Note: we ignore
Target
,Inherited
,Documented
, andRetention
.- Parameters:
annotationType
- type of annotation- Returns:
true
if the annotation is declared on this annotation, or is inherited from a declared annotation
-