* @throws ConfigurationException if there is a problem wiring the instance
*/
public void wireDependencies(Object target) throws ConfigurationException {
try {
Class<?> targetClass = target.getClass();
ComponentMetadata metadata = getComponentMetadataRepo().findComponentMetadata(targetClass);
if (metadata != null && metadata.getInjectMethods() != null && metadata.getInjectMethods().length != 0) {
// search for anything we need to inject
for (ComponentMetadata.InjectMetadata injectMetadata : metadata.getInjectMethods()) {
Class<?>[] methodParameters = injectMetadata.getParameterClasses();
if (methodParameters == null) {
methodParameters = ReflectionUtil.toClassArray(injectMetadata.getParameters());
injectMetadata.setParameterClasses(methodParameters);
}