Annotation Type ReferenceInject
-
@Target({METHOD,FIELD,PARAMETER}) @Retention(RUNTIME) @InjectAnnotation public @interface ReferenceInject
Allows for the injection of Resources or objects of types adaptable from Resource based on path references. This injector will work for single instances or parameterized Collections.This injector will look to the value of the property whose name is that of the annotated element and treating it as an absolute or relative path, will get the Resource identified by the path (starting from the current resource when the path is relative).
This injector will only work if you are adapting from a Resource or SlingHttpServletRequest.
This injector will respect the value of the
Namedannotation.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleaninheritInjectionStrategyinjectionStrategy
-
-
-
Field Detail
-
NAME
static final String NAME
-
-
Element Detail
-
injectionStrategy
InjectionStrategy injectionStrategy
if set to REQUIRED injection is mandatory, if set to OPTIONAL injection is optional, in case of DEFAULT the standard annotations (Optional,Required) are used. If even those are not available the default injection strategy defined on theModelapplies. Default value = DEFAULT.- Returns:
- Injection strategy
- Default:
- org.apache.sling.models.annotations.injectorspecific.InjectionStrategy.DEFAULT
-
-