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.ObjectgetDefault()Tries to get the default value from the annotation.InjectionStrategygetInjectionStrategy()Tries to get the information whether the injection is optional.java.lang.StringgetName()Tries to get the name value from the annotation.java.lang.StringgetVia()Tries to get the via value from the annotation.booleanhasDefault()-
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:
getNamein 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:
getViain 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:
hasDefaultin 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:
getDefaultin 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:
REQUIREDif injection is mandatory,OPTIONALif injection is optional orDEFAULTin which case the standard annotation/injection strategy should be used.
-
-