Constructor and Description |
---|
ChildInjector() |
Modifier and Type | Method and Description |
---|---|
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,
Child annotation)
When overridden in an injector class, extracts a value from a
SlingHttpServletRequest or a
Resource instance |
public static final String NAME
@Nonnull public String getName()
Injector
@Nonnull public Injectable getValue(Object adaptable, String name, Type type, Child 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.