MentaContainer

Compare Revisions

Ignore whitespace Rev 39 → Rev 40

/trunk/src/main/java/org/mentacontainer/impl/MentaComponent.java
118,7 → 118,7
/*
* Use reflection to set a property in the bean
*/
private void setValue(Object bean, String name, Object value) throws InstantiationException {
private void setValue(Object bean, String name, Object value) {
try {
178,7 → 178,7
} catch(Exception e) {
throw new InstantiationException("Error trying to set a property with reflection: " + name);
throw new RuntimeException("Error trying to set a property with reflection: " + name, e);
}
}
194,7 → 194,7
return null;
}
public Object getInstance() throws InstantiationException {
public Object getInstance() {
if (singleton && singletonValue != null) return singletonValue;
210,7 → 210,7
} catch(Exception e) {
throw new InstantiationException("Cannot find a constructor for class: " + klass);
throw new RuntimeException("Cannot find a constructor for class: " + klass, e);
}
}
220,7 → 220,7
} catch(Exception e) {
throw new InstantiationException("Cannot create instance from constructor: " + constructor);
throw new RuntimeException("Cannot create instance from constructor: " + constructor, e);
}
} else {
231,7 → 231,7
} catch(Exception e) {
throw new InstantiationException("Cannot create instance from class: " + klass);
throw new RuntimeException("Cannot create instance from class: " + klass, e);
}
}