Constructor and Description |
---|
I18nInjector() |
Modifier and Type | Method and Description |
---|---|
I18N |
getManagedAnnotation(AnnotatedElement element)
When overridden in an injector class, retrieves the annotation processed by this particular injector.
|
String |
getName()
Retrieves the name of the current instance
|
Object |
getValue(Object adaptable,
String name,
Type type,
AnnotatedElement element,
org.apache.sling.models.spi.DisposalCallbackRegistry callbackRegistry)
Attempts to produce a value that can be further injected by Sling into the given adaptable
|
Injectable |
getValue(Object adaptable,
String name,
Type type,
I18N annotation)
When overridden in an injector class, extracts a value from a
SlingHttpServletRequest or a
Resource instance |
public static final String NAME
public I18N getManagedAnnotation(AnnotatedElement element)
element
- AnnotatedElement
instance that facades the Java class member and allows retrieving
annotationsAnnotation
instance@Nonnull public String getName()
Injector
@Nonnull public Injectable getValue(Object adaptable, String name, Type type, I18N annotation)
SlingHttpServletRequest
or a
Resource
instanceadaptable
- A SlingHttpServletRequest
or a Resource
instancename
- Name of the Java class member to inject the value intotype
- Type of the receiving Java class memberannotation
- Annotation handled by the current injectorInjectable
instance that contains the payload that can be null@CheckForNull public final Object getValue(@Nonnull Object adaptable, String name, @Nonnull Type type, @Nonnull AnnotatedElement element, @Nonnull org.apache.sling.models.spi.DisposalCallbackRegistry callbackRegistry)
getValue
in interface org.apache.sling.models.spi.Injector
adaptable
- A SlingHttpServletRequest
or a Resource
instancename
- Name of the Java class member to inject the value intotype
- Type of receiving Java class memberelement
- AnnotatedElement
instance that facades the Java class member and allows to
retrieve annotationscallbackRegistry
- DisposalCallbackRegistry
objectCopyright © 2024 Exadel, Inc.. All rights reserved.