src/share/classes/sun/reflect/LangReflectAccess.java

Print this page


   1 /*
   2  * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  64                                              int slot,
  65                                              String signature,
  66                                              byte[] annotations,
  67                                              byte[] parameterAnnotations);
  68 
  69     /** Gets the MethodAccessor object for a java.lang.reflect.Method */
  70     public MethodAccessor getMethodAccessor(Method m);
  71 
  72     /** Sets the MethodAccessor object for a java.lang.reflect.Method */
  73     public void setMethodAccessor(Method m, MethodAccessor accessor);
  74 
  75     /** Gets the ConstructorAccessor object for a
  76         java.lang.reflect.Constructor */
  77     public ConstructorAccessor getConstructorAccessor(Constructor<?> c);
  78 
  79     /** Sets the ConstructorAccessor object for a
  80         java.lang.reflect.Constructor */
  81     public void setConstructorAccessor(Constructor<?> c,
  82                                        ConstructorAccessor accessor);
  83 



  84     /** Gets the "slot" field from a Constructor (used for serialization) */
  85     public int getConstructorSlot(Constructor<?> c);
  86 
  87     /** Gets the "signature" field from a Constructor (used for serialization) */
  88     public String getConstructorSignature(Constructor<?> c);
  89 
  90     /** Gets the "annotations" field from a Constructor (used for serialization) */
  91     public byte[] getConstructorAnnotations(Constructor<?> c);
  92 
  93     /** Gets the "parameterAnnotations" field from a Constructor (used for serialization) */
  94     public byte[] getConstructorParameterAnnotations(Constructor<?> c);
  95 
  96     //
  97     // Copying routines, needed to quickly fabricate new Field,
  98     // Method, and Constructor objects from templates
  99     //
 100 
 101     /** Makes a "child" copy of a Method */
 102     public Method      copyMethod(Method arg);
 103 
 104     /** Makes a "child" copy of a Field */
 105     public Field       copyField(Field arg);
 106 
 107     /** Makes a "child" copy of a Constructor */
 108     public <T> Constructor<T> copyConstructor(Constructor<T> arg);
 109 }
   1 /*
   2  * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  64                                              int slot,
  65                                              String signature,
  66                                              byte[] annotations,
  67                                              byte[] parameterAnnotations);
  68 
  69     /** Gets the MethodAccessor object for a java.lang.reflect.Method */
  70     public MethodAccessor getMethodAccessor(Method m);
  71 
  72     /** Sets the MethodAccessor object for a java.lang.reflect.Method */
  73     public void setMethodAccessor(Method m, MethodAccessor accessor);
  74 
  75     /** Gets the ConstructorAccessor object for a
  76         java.lang.reflect.Constructor */
  77     public ConstructorAccessor getConstructorAccessor(Constructor<?> c);
  78 
  79     /** Sets the ConstructorAccessor object for a
  80         java.lang.reflect.Constructor */
  81     public void setConstructorAccessor(Constructor<?> c,
  82                                        ConstructorAccessor accessor);
  83 
  84     /** Gets the byte[] that encodes TypeAnnotations on an Executable. */
  85     public byte[] getExecutableTypeAnnotationBytes(Executable ex);
  86 
  87     /** Gets the "slot" field from a Constructor (used for serialization) */
  88     public int getConstructorSlot(Constructor<?> c);
  89 
  90     /** Gets the "signature" field from a Constructor (used for serialization) */
  91     public String getConstructorSignature(Constructor<?> c);
  92 
  93     /** Gets the "annotations" field from a Constructor (used for serialization) */
  94     public byte[] getConstructorAnnotations(Constructor<?> c);
  95 
  96     /** Gets the "parameterAnnotations" field from a Constructor (used for serialization) */
  97     public byte[] getConstructorParameterAnnotations(Constructor<?> c);
  98 

  99     // Copying routines, needed to quickly fabricate new Field,
 100     // Method, and Constructor objects from templates
 101     //
 102 
 103     /** Makes a "child" copy of a Method */
 104     public Method      copyMethod(Method arg);
 105 
 106     /** Makes a "child" copy of a Field */
 107     public Field       copyField(Field arg);
 108 
 109     /** Makes a "child" copy of a Constructor */
 110     public <T> Constructor<T> copyConstructor(Constructor<T> arg);
 111 }