< prev index next >

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

Print this page




 137     }
 138 
 139     //
 140     // Copying routines, needed to quickly fabricate new Field,
 141     // Method, and Constructor objects from templates
 142     //
 143     public Method      copyMethod(Method arg) {
 144         return arg.copy();
 145     }
 146     public Method      leafCopyMethod(Method arg) {
 147         return arg.leafCopy();
 148     }
 149 
 150     public Field       copyField(Field arg) {
 151         return arg.copy();
 152     }
 153 
 154     public <T> Constructor<T> copyConstructor(Constructor<T> arg) {
 155         return arg.copy();
 156     }





 157 }


 137     }
 138 
 139     //
 140     // Copying routines, needed to quickly fabricate new Field,
 141     // Method, and Constructor objects from templates
 142     //
 143     public Method      copyMethod(Method arg) {
 144         return arg.copy();
 145     }
 146     public Method      leafCopyMethod(Method arg) {
 147         return arg.leafCopy();
 148     }
 149 
 150     public Field       copyField(Field arg) {
 151         return arg.copy();
 152     }
 153 
 154     public <T> Constructor<T> copyConstructor(Constructor<T> arg) {
 155         return arg.copy();
 156     }
 157 
 158     @SuppressWarnings("unchecked")
 159     public <T extends AccessibleObject> T getRoot(T obj) {
 160         return (T) obj.getRoot();
 161     }
 162 }
< prev index next >