|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hivemind.service.impl.AutowiringImpl
public class AutowiringImpl
Implementation of Autowiring
.
Skips properties of primitive type and the standard java data types (String, Double etc.).
Properties that are already assigned are skipped too.
Delegates the autowiring to implementations of AutowiringStrategy
.
If errors occur they are passed to an ErrorHandler
. Depending on its
implementation the wiring either continues with the next property or an exception
is thrown.
Constructor Summary | |
---|---|
AutowiringImpl(RegistryInfrastructure registry,
java.util.List strategyContributions,
ErrorHandler errorHandler)
|
Method Summary | |
---|---|
java.lang.Object |
autowireProperties(java.lang.Object target)
Autowires all writable properties of target . |
java.lang.Object |
autowireProperties(java.lang.Object target,
java.lang.String[] propertyNames)
Autowires the properties of target defined in propertyNames . |
java.lang.Object |
autowireProperties(java.lang.String strategy,
java.lang.Object target)
Autowires all writable properties of target using a certain strategy. |
java.lang.Object |
autowireProperties(java.lang.String strategyName,
java.lang.Object target,
java.lang.String[] propertyNames)
Autowires the properties of target defined in propertyNames
using a certain strategy. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AutowiringImpl(RegistryInfrastructure registry, java.util.List strategyContributions, ErrorHandler errorHandler)
registry
- reference to registrystrategyContributions
- list with instances of AutowiringStrategyContribution
errorHandler
- handler for dealing with recoverable errors.Method Detail |
---|
public java.lang.Object autowireProperties(java.lang.Object target)
Autowiring
target
.
All available strategies are tried until one strategy succeeds.
autowireProperties
in interface Autowiring
target
- the target object whose properties should be wired
Autowiring.autowireProperties(java.lang.Object)
public java.lang.Object autowireProperties(java.lang.Object target, java.lang.String[] propertyNames)
Autowiring
target
defined in propertyNames
.
All available strategies are tried until one strategy succeeds.
autowireProperties
in interface Autowiring
target
- the target object whose properties should be wiredpropertyNames
- the properties to wire
Autowiring.autowireProperties(java.lang.Object, java.lang.String[])
public java.lang.Object autowireProperties(java.lang.String strategy, java.lang.Object target)
Autowiring
target
using a certain strategy.
autowireProperties
in interface Autowiring
strategy
- name of the strategy to be used. Standard strategies are defined
in AutowiringStrategy
target
- the target object whose properties should be wired
Autowiring.autowireProperties(java.lang.String, java.lang.Object)
public java.lang.Object autowireProperties(java.lang.String strategyName, java.lang.Object target, java.lang.String[] propertyNames)
Autowiring
target
defined in propertyNames
using a certain strategy.
autowireProperties
in interface Autowiring
strategyName
- name of the strategy to be used. Standard strategies are defined
in AutowiringStrategy
target
- the target object whose properties should be wiredpropertyNames
- the properties to wire
Autowiring.autowireProperties(java.lang.String, java.lang.Object, java.lang.String[])
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |