Class ModelClassConstructor<M>
- java.lang.Object
-
- org.apache.sling.models.impl.model.ModelClassConstructor<M>
-
public class ModelClassConstructor<M> extends Object
-
-
Constructor Summary
Constructors Constructor Description ModelClassConstructor(Constructor<M> constructor, org.apache.sling.models.spi.injectorspecific.StaticInjectAnnotationProcessorFactory[] processorFactories, org.apache.sling.models.annotations.DefaultInjectionStrategy defaultInjectionStrategy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Constructor<M>
getConstructor()
ConstructorParameter[]
getConstructorParameters()
boolean
hasInjectAnnotation()
M
newInstance(Object... parameters)
Proxies the call toConstructor.newInstance(Object...)
, checking (and setting) accessibility first.
-
-
-
Constructor Detail
-
ModelClassConstructor
public ModelClassConstructor(Constructor<M> constructor, org.apache.sling.models.spi.injectorspecific.StaticInjectAnnotationProcessorFactory[] processorFactories, org.apache.sling.models.annotations.DefaultInjectionStrategy defaultInjectionStrategy)
-
-
Method Detail
-
newInstance
public M newInstance(Object... parameters) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException
Proxies the call toConstructor.newInstance(Object...)
, checking (and setting) accessibility first.- Parameters:
parameters
- the constructor parameters that are passed toConstructor.newInstance(Object...)
- Returns:
- The constructed object
- Throws:
InstantiationException
- whenConstructor.newInstance(Object...)
would throwIllegalAccessException
- whenConstructor.newInstance(Object...)
would throwIllegalArgumentException
- whenConstructor.newInstance(Object...)
would throwInvocationTargetException
- whenConstructor.newInstance(Object...)
would throw- See Also:
Constructor.newInstance(Object...)
-
getConstructor
public Constructor<M> getConstructor()
-
hasInjectAnnotation
public boolean hasInjectAnnotation()
-
getConstructorParameters
public ConstructorParameter[] getConstructorParameters()
-
-