public interface ConstructorInjector
InstanceManager.register(int, ConstructorInjector)
where
the integer is the parameter index. Only one injector can inject a value
for a specific index. If several injectors are registered for the same index,
the component type is declared as invalid.Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getConstructorParameter(int index)
Gets the object to inject in the constructor parameter.
|
java.lang.Class |
getConstructorParameterType(int index)
Gets the type of the object to inject in the constructor parameter.
|
java.lang.Object getConstructorParameter(int index)
index
- the parameter indexjava.lang.Class getConstructorParameterType(int index)
null
will try to get the class from the
injected object, however this can be wrong (implementation instead of interface,
boxed objects...) and error-prone.index
- the parameter indexCopyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.