Annotation Type ContextAwareConfiguration
@Target({METHOD,FIELD,PARAMETER})
@Retention(RUNTIME)
@InjectAnnotation
public @interface ContextAwareConfiguration
Annotation to be used on either methods, fields or constructor parameters to let Sling Models inject a context-aware configuration.
The annotation supports the same features and semantics as
ConfigurationBuilder
.
For configuration collections, you can use arrays, List
or Collection
variables.-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionDefine configuration name.
-
Element Details
-
name
String nameDefine configuration name. Optional if used together with a context-aware configuration annotation class, which implictely defines a configuration name.- Returns:
- Configuration name
- Default:
- ""
-
injectionStrategy
InjectionStrategy injectionStrategyif 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 theModel
applies. Default value = DEFAULT.- Default:
- DEFAULT
-