< 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      */

122      */
123     VarHandle insertCoordinates(VarHandle target, int pos, Object... values);
124 
125     /**
126      * Returns a native method handle with given arguments as fallback and steering info.
127      *
128      * Will allow JIT to intrinsify.
129      *
130      * @param nep the native entry point
131      * @param fallback the fallback handle
132      * @return the native method handle
133      */
134     MethodHandle nativeMethodHandle(NativeEntryPoint nep, MethodHandle fallback);
135 
136     /**
137      * Ensure given method handle is customized
138      *
139      * @param mh the method handle
140      */
141     void ensureCustomized(MethodHandle mh);




142 }

 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.Field;
 34 import java.nio.ByteOrder;
 35 import java.util.List;
 36 import java.util.Map;
 37 import java.util.stream.Stream;
 38 
 39 public interface JavaLangInvokeAccess {
 40     /**
 41      * Create a new MemberName instance. Used by {@code StackFrameInfo}.
 42      */
 43     Object newMemberName();
 44 
 45     /**
 46      * Returns the name for the given MemberName. Used by {@code StackFrameInfo}.
 47      */
 48     String getName(Object mname);
 49 
 50     /**
 51      * Returns the {@code MethodType} for the given MemberName.
 52      * Used by {@code StackFrameInfo}.
 53      */

123      */
124     VarHandle insertCoordinates(VarHandle target, int pos, Object... values);
125 
126     /**
127      * Returns a native method handle with given arguments as fallback and steering info.
128      *
129      * Will allow JIT to intrinsify.
130      *
131      * @param nep the native entry point
132      * @param fallback the fallback handle
133      * @return the native method handle
134      */
135     MethodHandle nativeMethodHandle(NativeEntryPoint nep, MethodHandle fallback);
136 
137     /**
138      * Ensure given method handle is customized
139      *
140      * @param mh the method handle
141      */
142     void ensureCustomized(MethodHandle mh);
143 
144     MethodHandle findStatic(Class<?> cls, String name, MethodType methodType) throws NoSuchMethodException, IllegalAccessException;
145 
146     MethodHandle unreflectGetter(Field field) throws IllegalAccessException;
147 }
< prev index next >