public class RequestSelectorsInjector extends Object
selectors
property of the SlingHttpServletRequest
obtained via RequestPathInfo
RequestSelectors
,
BaseInjector
Constructor and Description |
---|
RequestSelectorsInjector() |
Modifier and Type | Method and Description |
---|---|
org.apache.sling.models.spi.injectorspecific.InjectAnnotationProcessor2 |
createAnnotationProcessor(AnnotatedElement element) |
RequestSelectors |
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,
RequestSelectors annotation)
When overridden in an injector class, extracts a value from a
SlingHttpServletRequest or a
Resource instance |
public static final String NAME
public RequestSelectors 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, RequestSelectors 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 nullpublic org.apache.sling.models.spi.injectorspecific.InjectAnnotationProcessor2 createAnnotationProcessor(AnnotatedElement element)
createAnnotationProcessor
in interface org.apache.sling.models.spi.injectorspecific.StaticInjectAnnotationProcessorFactory
@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.