109 return arg.leafCopy();
110 }
111
112 public Field copyField(Field arg) {
113 return arg.copy();
114 }
115
116 public <T> Constructor<T> copyConstructor(Constructor<T> arg) {
117 return arg.copy();
118 }
119
120 @SuppressWarnings("unchecked")
121 public <T extends AccessibleObject> T getRoot(T obj) {
122 return (T) obj.getRoot();
123 }
124
125 public boolean isTrustedFinalField(Field f) {
126 return f.isTrustedFinal();
127 }
128
129 public <T> T newInstance(Constructor<T> ctor, Object[] args, Class<?> caller)
130 throws IllegalAccessException, InstantiationException, InvocationTargetException
131 {
132 return ctor.newInstanceWithCaller(args, true, caller);
133 }
134 }
|
109 return arg.leafCopy();
110 }
111
112 public Field copyField(Field arg) {
113 return arg.copy();
114 }
115
116 public <T> Constructor<T> copyConstructor(Constructor<T> arg) {
117 return arg.copy();
118 }
119
120 @SuppressWarnings("unchecked")
121 public <T extends AccessibleObject> T getRoot(T obj) {
122 return (T) obj.getRoot();
123 }
124
125 public boolean isTrustedFinalField(Field f) {
126 return f.isTrustedFinal();
127 }
128
129 public boolean isNullRestrictedField(Field f) {
130 return f.isNullRestricted();
131 }
132
133 public <T> T newInstance(Constructor<T> ctor, Object[] args, Class<?> caller)
134 throws IllegalAccessException, InstantiationException, InvocationTargetException
135 {
136 return ctor.newInstanceWithCaller(args, true, caller);
137 }
138 }
|