< prev index next >

src/java.base/share/classes/java/lang/reflect/ReflectAccess.java

Print this page

56         return arg.copy();
57     }
58 
59     public Field       copyField(Field arg) {
60         return arg.copy();
61     }
62 
63     public <T> Constructor<T> copyConstructor(Constructor<T> arg) {
64         return arg.copy();
65     }
66 
67     @SuppressWarnings("unchecked")
68     public <T extends AccessibleObject> T getRoot(T obj) {
69         return (T) obj.getRoot();
70     }
71 
72     public boolean isTrustedFinalField(Field f) {
73         return f.isTrustedFinal();
74     }
75 




76     public <T> T newInstance(Constructor<T> ctor, Object[] args, Class<?> caller)
77         throws IllegalAccessException, InstantiationException, InvocationTargetException
78     {
79         return ctor.newInstanceWithCaller(args, true, caller);
80     }
81 }

56         return arg.copy();
57     }
58 
59     public Field       copyField(Field arg) {
60         return arg.copy();
61     }
62 
63     public <T> Constructor<T> copyConstructor(Constructor<T> arg) {
64         return arg.copy();
65     }
66 
67     @SuppressWarnings("unchecked")
68     public <T extends AccessibleObject> T getRoot(T obj) {
69         return (T) obj.getRoot();
70     }
71 
72     public boolean isTrustedFinalField(Field f) {
73         return f.isTrustedFinal();
74     }
75 
76     public boolean isNullRestrictedField(Field f) {
77         return f.isNullRestricted();
78     }
79 
80     public <T> T newInstance(Constructor<T> ctor, Object[] args, Class<?> caller)
81         throws IllegalAccessException, InstantiationException, InvocationTargetException
82     {
83         return ctor.newInstanceWithCaller(args, true, caller);
84     }
85 }
< prev index next >