01: package org.vraptor.reflection;
02:
03: import java.util.ArrayList;
04: import java.util.HashSet;
05: import java.util.List;
06: import java.util.Set;
07:
08: import org.vraptor.annotations.Parameter;
09:
10: @SuppressWarnings("unused")
11: public class ParentClass {
12:
13: @Parameter
14: ChildClass child = new ChildClass();
15:
16: @Parameter
17: ChildClass[] childArray = new ChildClass[2];
18:
19: @Parameter
20: List<ChildClass> childList = new ArrayList<ChildClass>();
21:
22: @Parameter
23: Set<ChildClass> childSet = new HashSet<ChildClass>();
24:
25: @Parameter(create=true)
26: ChildClass lazyChild;
27:
28: @Parameter(create=true)
29: ChildClass[] lazyChildArray;
30:
31: @Parameter(create=true)
32: List<ChildClass> lazyChildList;
33:
34: @Parameter(create=true)
35: Set<ChildClass> lazyChildSet;
36:
37: @Parameter(create=true)
38: MotherClass lazyMother = new MotherClass();
39:
40: @Parameter
41: private ChildClass mainChild = new ChildClass();
42:
43: @Parameter
44: MotherClass mother = new MotherClass();
45:
46: @Parameter
47: String[] values;
48:
49: ParentClass() {
50: mother.setChilds(new ChildClass[2]);
51: for (int i = 0; i < 2; i++) {
52: childArray[i] = new ChildClass();
53: childList.add(new ChildClass());
54: childSet.add(new ChildClass());
55: mother.getChilds()[i] = new ChildClass();
56: }
57: }
58:
59: public ChildClass getMainChild() {
60: return mainChild;
61: }
62:
63: }
|