Class ChildResourceInjector
- java.lang.Object
-
- org.apache.sling.models.impl.injectors.ChildResourceInjector
-
- All Implemented Interfaces:
org.apache.sling.models.spi.Injector
,org.apache.sling.models.spi.injectorspecific.InjectAnnotationProcessorFactory2
public class ChildResourceInjector extends Object implements org.apache.sling.models.spi.Injector, org.apache.sling.models.spi.injectorspecific.InjectAnnotationProcessorFactory2
-
-
Constructor Summary
Constructors Constructor Description ChildResourceInjector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.sling.models.spi.injectorspecific.InjectAnnotationProcessor2
createAnnotationProcessor(Object adaptable, AnnotatedElement element)
@NotNull String
getName()
protected org.apache.sling.api.resource.ResourceResolver
getResourceResolver(Object adaptable)
Object
getValue(@NotNull Object adaptable, String name, @NotNull Type declaredType, @NotNull AnnotatedElement element, @NotNull org.apache.sling.models.spi.DisposalCallbackRegistry callbackRegistry)
protected @Nullable org.apache.sling.api.resource.ValueMap
getValueMap(Object adaptable)
Retrieve the ValueMap from the given adaptable.protected boolean
isDeclaredTypeCollection(Type declaredType)
-
-
-
Method Detail
-
getName
@NotNull public @NotNull String getName()
- Specified by:
getName
in interfaceorg.apache.sling.models.spi.Injector
-
getValue
public Object getValue(@NotNull @NotNull Object adaptable, String name, @NotNull @NotNull Type declaredType, @NotNull @NotNull AnnotatedElement element, @NotNull @NotNull org.apache.sling.models.spi.DisposalCallbackRegistry callbackRegistry)
- Specified by:
getValue
in interfaceorg.apache.sling.models.spi.Injector
-
createAnnotationProcessor
public org.apache.sling.models.spi.injectorspecific.InjectAnnotationProcessor2 createAnnotationProcessor(Object adaptable, AnnotatedElement element)
- Specified by:
createAnnotationProcessor
in interfaceorg.apache.sling.models.spi.injectorspecific.InjectAnnotationProcessorFactory2
-
getResourceResolver
protected org.apache.sling.api.resource.ResourceResolver getResourceResolver(Object adaptable)
-
getValueMap
@Nullable protected @Nullable org.apache.sling.api.resource.ValueMap getValueMap(Object adaptable)
Retrieve the ValueMap from the given adaptable. This succeeds, if the adaptable is either- a
ValueMap
, - a
SlingHttpServletRequest
, in which case the returnedValueMap
is the one derived from the request's resource or - adaptable to a
ValueMap
.
null
is returned.- Parameters:
adaptable
- Adaptable- Returns:
- a ValueMap or
null
.
- a
-
isDeclaredTypeCollection
protected boolean isDeclaredTypeCollection(Type declaredType)
-
-