< prev index next >

src/java.base/share/classes/jdk/internal/access/JavaLangInvokeAccess.java

Print this page

 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
 23  * questions.
 24  */
 25 
 26 package jdk.internal.access;
 27 
 28 import jdk.internal.invoke.NativeEntryPoint;
 29 
 30 import java.lang.invoke.MethodHandle;
 31 import java.lang.invoke.MethodType;
 32 import java.lang.invoke.VarHandle;


 33 import java.nio.ByteOrder;
 34 import java.util.List;
 35 import java.util.Map;
 36 import java.util.stream.Stream;
 37 
 38 public interface JavaLangInvokeAccess {

















 39     /**
 40      * Create a new MemberName instance. Used by {@code StackFrameInfo}.
 41      */
 42     Object newMemberName();
 43 





 44     /**
 45      * Returns the name for the given MemberName. Used by {@code StackFrameInfo}.
 46      */
 47     String getName(Object mname);
 48 
 49     /**
 50      * Returns the {@code MethodType} for the given MemberName.
 51      * Used by {@code StackFrameInfo}.
 52      */
 53     MethodType getMethodType(Object mname);
 54 
 55     /**
 56      * Returns the descriptor for the given MemberName.
 57      * Used by {@code StackFrameInfo}.
 58      */
 59     String getMethodDescriptor(Object mname);
 60 
 61     /**
 62      * Returns {@code true} if the given MemberName is a native method.
 63      * Used by {@code StackFrameInfo}.

 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
 23  * questions.
 24  */
 25 
 26 package jdk.internal.access;
 27 
 28 import jdk.internal.invoke.NativeEntryPoint;
 29 
 30 import java.lang.invoke.MethodHandle;
 31 import java.lang.invoke.MethodType;
 32 import java.lang.invoke.VarHandle;
 33 import java.lang.reflect.Constructor;
 34 import java.lang.reflect.Method;
 35 import java.nio.ByteOrder;
 36 import java.util.List;
 37 import java.util.Map;
 38 import java.util.stream.Stream;
 39 
 40 public interface JavaLangInvokeAccess {
 41 
 42     /**
 43      * Creates a direct method handle that can invoke the reflected method
 44      */
 45     MethodHandle privilegedUnreflect(Method method);
 46 
 47     /**
 48      * Create a method handle for the reflected constructor.
 49      */
 50     MethodHandle privilegedUnreflect(Constructor<?> ctor);
 51 
 52     /**
 53      * Create a method handle for a static method
 54      */
 55     MethodHandle privilegedFindStatic(Class<?> refc, String name, MethodType type)
 56         throws NoSuchMethodException;
 57 
 58     /**
 59      * Create a new MemberName instance. Used by {@code StackFrameInfo}.
 60      */
 61     Object newMemberName();
 62 
 63     /**
 64      * Create a new MemberName instance. Used by {@code StackFrameInfo}.
 65      */
 66     Object newMemberName(Method method);
 67 
 68     /**
 69      * Returns the name for the given MemberName. Used by {@code StackFrameInfo}.
 70      */
 71     String getName(Object mname);
 72 
 73     /**
 74      * Returns the {@code MethodType} for the given MemberName.
 75      * Used by {@code StackFrameInfo}.
 76      */
 77     MethodType getMethodType(Object mname);
 78 
 79     /**
 80      * Returns the descriptor for the given MemberName.
 81      * Used by {@code StackFrameInfo}.
 82      */
 83     String getMethodDescriptor(Object mname);
 84 
 85     /**
 86      * Returns {@code true} if the given MemberName is a native method.
 87      * Used by {@code StackFrameInfo}.
< prev index next >