Class OptionalTypedInjectableElement
java.lang.Object
org.apache.sling.models.impl.model.OptionalTypedInjectableElement
- All Implemented Interfaces:
InjectableElement
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()getType()getVia()Class<? extends org.apache.sling.models.annotations.ViaProviderType>booleanbooleanisOptional(org.apache.sling.models.spi.injectorspecific.InjectAnnotationProcessor annotationProcessor) boolean
-
Constructor Details
-
OptionalTypedInjectableElement
-
-
Method Details
-
getAnnotatedElement
- Specified by:
getAnnotatedElementin interfaceInjectableElement- Returns:
- Underlying annotated element
-
getType
- Specified by:
getTypein interfaceInjectableElement- Returns:
- Type of injectable mapped to wrapper class
-
isPrimitive
public boolean isPrimitive()- Specified by:
isPrimitivein interfaceInjectableElement- Returns:
- true if original type of injectable is a primitive type
-
getName
- Specified by:
getNamein interfaceInjectableElement- Returns:
- Name for injection
-
getSource
- Specified by:
getSourcein interfaceInjectableElement- Returns:
- Via annotation or null
-
getVia
- Specified by:
getViain interfaceInjectableElement- Returns:
- Via annotation or null
-
getViaProviderType
- Specified by:
getViaProviderTypein interfaceInjectableElement
-
hasDefaultValue
public boolean hasDefaultValue()- Specified by:
hasDefaultValuein interfaceInjectableElement- Returns:
- true, if a default value is set
-
getDefaultValue
- Specified by:
getDefaultValuein interfaceInjectableElement- Returns:
- Default value or null
-
isOptional
public boolean isOptional(org.apache.sling.models.spi.injectorspecific.InjectAnnotationProcessor annotationProcessor) - Specified by:
isOptionalin interfaceInjectableElement- Parameters:
annotationProcessor- Annotation processor- Returns:
trueif the element is optional otherwisefalse
-