Interface InjectAnnotationProcessor2
-
- All Superinterfaces:
InjectAnnotationProcessor
- All Known Implementing Classes:
AbstractInjectAnnotationProcessor2
@ConsumerType public interface InjectAnnotationProcessor2 extends InjectAnnotationProcessor
Processor for injector-specific annotations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
getDefault()
Tries to get the default value from the annotation.InjectionStrategy
getInjectionStrategy()
Tries to get the information whether the injection is optional.java.lang.String
getName()
Tries to get the name value from the annotation.java.lang.String
getVia()
Tries to get the via value from the annotation.boolean
hasDefault()
-
Methods inherited from interface org.apache.sling.models.spi.injectorspecific.InjectAnnotationProcessor
isOptional
-
-
-
-
Method Detail
-
getName
java.lang.String getName()
Tries to get the name value from the annotation.- Specified by:
getName
in interfaceInjectAnnotationProcessor
- Returns:
- the value to be used for the name or null, in which case the standard annotation or name derived from method/field should be used
-
getVia
java.lang.String getVia()
Tries to get the via value from the annotation.- Specified by:
getVia
in interfaceInjectAnnotationProcessor
- Returns:
- the value to be used for the via or null, in which case the standard annotation should be used
-
hasDefault
boolean hasDefault()
- Specified by:
hasDefault
in interfaceInjectAnnotationProcessor
- Returns:
- true, if a default value is set
-
getDefault
java.lang.Object getDefault()
Tries to get the default value from the annotation. Only used ifhasDefault()
is set to true.- Specified by:
getDefault
in interfaceInjectAnnotationProcessor
- Returns:
- the value to be used if nothing can be injected
-
getInjectionStrategy
InjectionStrategy getInjectionStrategy()
Tries to get the information whether the injection is optional.- Returns:
REQUIRED
if injection is mandatory,OPTIONAL
if injection is optional orDEFAULT
in which case the standard annotation/injection strategy should be used.
-
-