01: package org.conform;
02:
03: public class NewInstanceInitializer implements Initializer {
04: Class clazz;
05:
06: public NewInstanceInitializer(Class clazz) {
07: this .clazz = clazz;
08: }
09:
10: public Object getValue() {
11: try {
12: return clazz.newInstance();
13: } catch (Exception e) {
14: throw new RuntimeException(e);
15: }
16: }
17:
18: public String toString() {
19: return "NewInstance: " + clazz.getName();
20: }
21: }
|