Package org.apache.felix.scr.impl.inject
Class ComponentConstructor<S>
java.lang.Object
org.apache.felix.scr.impl.inject.ComponentConstructor<S>
This implementation is used to construct a component instance object,
call the constructor and set the activation fields.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Field[]
private final ValueUtils.ValueType[]
private final Constructor<S>
private final ValueUtils.ValueType[]
private final ReferenceMetadata[]
-
Constructor Summary
ConstructorsConstructorDescriptionComponentConstructor
(ComponentMetadata componentMetadata, Class<S> componentClass, ComponentLogger logger) -
Method Summary
Modifier and TypeMethodDescriptionprivate String
getNames
(List<ReferenceMetadata> refs) <T> S
newInstance
(ComponentContextImpl<S> componentContext, Map<ReferenceMetadata, DependencyManager.OpenStatus<S, ?>> parameterMap) Create a new instance
-
Field Details
-
activationFields
-
activationFieldTypes
-
constructor
-
constructorArgTypes
-
constructorRefs
-
-
Constructor Details
-
ComponentConstructor
public ComponentConstructor(ComponentMetadata componentMetadata, Class<S> componentClass, ComponentLogger logger)
-
-
Method Details
-
newInstance
public <T> S newInstance(ComponentContextImpl<S> componentContext, Map<ReferenceMetadata, DependencyManager.OpenStatus<S, throws Exception?>> parameterMap) Create a new instance- Parameters:
componentContext
- The component contextparameterMap
- A map of reference parameters for handling references in the constructor- Returns:
- The instance
- Throws:
Exception
- If anything goes wrong, like constructor can't be found etc.
-
getNames
-