1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 package info.magnolia.jcr.node2bean;
35
36 import java.lang.reflect.Method;
37
38
39
40
41 public class PropertyTypeDescriptor {
42 private String name;
43 private TypeDescriptor type;
44 private TypeDescriptor collectionEntryType;
45 private TypeDescriptor collectionKeyType;
46 private Method writeMethod;
47 private Method addMethod;
48 private Method readMethod;
49
50 public TypeDescriptor getCollectionEntryType() {
51 return this.collectionEntryType;
52 }
53
54 public void setCollectionEntryType(TypeDescriptor collectionEntryType) {
55 this.collectionEntryType = collectionEntryType;
56 }
57
58 public TypeDescriptor getCollectionKeyType() {
59 return this.collectionKeyType;
60 }
61
62 public void setCollectionKeyType(TypeDescriptor collectionKeyType) {
63 this.collectionKeyType = collectionKeyType;
64 }
65
66 public boolean isCollection() {
67 return getType().isCollection();
68 }
69
70 public boolean isMap() {
71 return getType().isMap();
72 }
73
74 public boolean isArray() {
75 return getType().isArray();
76 }
77
78 public TypeDescriptor getType() {
79 return this.type;
80 }
81
82 public void setType(TypeDescriptor type) {
83 this.type = type;
84 }
85
86 public String getName() {
87 return this.name;
88 }
89
90 public void setName(String name) {
91 this.name = name;
92 }
93
94 public Method getWriteMethod() {
95 return writeMethod;
96 }
97
98 public void setWriteMethod(Method writeMethod) {
99 this.writeMethod = writeMethod;
100 }
101
102
103
104
105 @Deprecated
106 public Method getAddMethod() {
107 return addMethod;
108 }
109
110
111
112
113 @Deprecated
114 public void setAddMethod(Method addMethod) {
115 this.addMethod = addMethod;
116 }
117
118 public Method getReadMethod() {
119 return readMethod;
120 }
121
122 public void setReadMethod(Method readMethod) {
123 this.readMethod = readMethod;
124 }
125 }