diff options
-rw-r--r-- | java/lang/invoke/MethodHandles.java | 42 | ||||
-rw-r--r-- | vm/reference/java/lang/invoke/VMMethodHandles.java | 62 |
2 files changed, 71 insertions, 33 deletions
diff --git a/java/lang/invoke/MethodHandles.java b/java/lang/invoke/MethodHandles.java index 74228abe9..968866785 100644 --- a/java/lang/invoke/MethodHandles.java +++ b/java/lang/invoke/MethodHandles.java @@ -180,72 +180,86 @@ public class MethodHandles throw new UnsupportedOperationException(); } - public MethodHandle findStatic(Class<?> refc, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException + public MethodHandle findStatic(Class<?> refc, String name, MethodType type) + throws NoSuchMethodException, IllegalAccessException { return VMMethodHandles.findStatic(this, refc, name, type); } - public MethodHandle findVirtual(Class<?> refc, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException + public MethodHandle findVirtual(Class<?> refc, String name, MethodType type) + throws NoSuchMethodException, IllegalAccessException { return VMMethodHandles.findVirtual(this, refc, name, type); } - public MethodHandle findConstructor(Class<?> refc, MethodType type) throws NoSuchMethodException, IllegalAccessException + public MethodHandle findConstructor(Class<?> refc, MethodType type) + throws NoSuchMethodException, IllegalAccessException { return VMMethodHandles.findConstructor(this, refc, type); } - public MethodHandle findSpecial(Class<?> refc, String name, MethodType type, Class<?> specialCaller) throws NoSuchMethodException, IllegalAccessException + public MethodHandle findSpecial(Class<?> refc, String name, MethodType type, Class<?> specialCaller) + throws NoSuchMethodException, IllegalAccessException { return VMMethodHandles.findSpecial(this, refc, name, type, specialCaller); } - public MethodHandle findGetter(Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException + public MethodHandle findGetter(Class<?> refc, String name, Class<?> type) + throws NoSuchFieldException, IllegalAccessException { return VMMethodHandles.findGetter(this, refc, name, type); } - public MethodHandle findSetter(Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException + public MethodHandle findSetter(Class<?> refc, String name, Class<?> type) + throws NoSuchFieldException, IllegalAccessException { return VMMethodHandles.findSetter(this, refc, name, type); } - public MethodHandle findStaticGetter(Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException + public MethodHandle findStaticGetter(Class<?> refc, String name, Class<?> type) + throws NoSuchFieldException, IllegalAccessException { return VMMethodHandles.findStaticGetter(this, refc, name, type); } - public MethodHandle findStaticSetter(Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException + public MethodHandle findStaticSetter(Class<?> refc, String name, Class<?> type) + throws NoSuchFieldException, IllegalAccessException { return VMMethodHandles.findStaticSetter(this, refc, name, type); } - public MethodHandle bind(Object obj, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException + public MethodHandle bind(Object obj, String name, MethodType type) + throws NoSuchMethodException, IllegalAccessException { throw new UnsupportedOperationException(); } - public MethodHandle unreflect(Method method) throws IllegalAccessException + public MethodHandle unreflect(Method method) + throws IllegalAccessException { throw new UnsupportedOperationException(); } - public MethodHandle unreflectSpecial(Method method, Class<?> specialCaller) throws IllegalAccessException + public MethodHandle unreflectSpecial(Method method, Class<?> specialCaller) + throws IllegalAccessException { throw new UnsupportedOperationException(); } - public MethodHandle unreflectConstructor(Constructor<?> ctor) throws IllegalAccessException + public MethodHandle unreflectConstructor(Constructor<?> ctor) + throws IllegalAccessException { throw new UnsupportedOperationException(); } - public MethodHandle unreflectGetter(Field field) throws IllegalAccessException + public MethodHandle unreflectGetter(Field field) + throws IllegalAccessException { throw new UnsupportedOperationException(); } - public MethodHandle unreflectSetter(Field field) throws IllegalAccessException + public MethodHandle unreflectSetter(Field field) + throws IllegalAccessException { throw new UnsupportedOperationException(); } diff --git a/vm/reference/java/lang/invoke/VMMethodHandles.java b/vm/reference/java/lang/invoke/VMMethodHandles.java index c5f58965f..6768f2dab 100644 --- a/vm/reference/java/lang/invoke/VMMethodHandles.java +++ b/vm/reference/java/lang/invoke/VMMethodHandles.java @@ -39,23 +39,47 @@ package java.lang.invoke; public final class VMMethodHandles { - private VMMethodHandles() - { - } - - static native MethodHandle findStatic(MethodHandles.Lookup lookup, Class<?> refc, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException; - - static native MethodHandle findVirtual(MethodHandles.Lookup lookup, Class<?> refc, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException; - - static native MethodHandle findConstructor(MethodHandles.Lookup lookup, Class<?> refc, MethodType type) throws NoSuchMethodException, IllegalAccessException; - - static native MethodHandle findSpecial(MethodHandles.Lookup lookup, Class<?> refc, String name, MethodType type, Class<?> specialCaller) throws NoSuchMethodException, IllegalAccessException; - - static native MethodHandle findGetter(MethodHandles.Lookup lookup, Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException; - - static native MethodHandle findSetter(MethodHandles.Lookup lookup, Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException; - - static native MethodHandle findStaticGetter(MethodHandles.Lookup lookup, Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException; - - static native MethodHandle findStaticSetter(MethodHandles.Lookup lookup, Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException; + private VMMethodHandles() + { + } + + static native MethodHandle findStatic(MethodHandles.Lookup lookup, + Class<?> refc, String name, + MethodType type) + throws NoSuchMethodException, IllegalAccessException; + + static native MethodHandle findVirtual(MethodHandles.Lookup lookup, + Class<?> refc, String name, + MethodType type) + throws NoSuchMethodException, IllegalAccessException; + + static native MethodHandle findConstructor(MethodHandles.Lookup lookup, + Class<?> refc, MethodType type) + throws NoSuchMethodException, IllegalAccessException; + + static native MethodHandle findSpecial(MethodHandles.Lookup lookup, + Class<?> refc, String name, + MethodType type, + Class<?> specialCaller) + throws NoSuchMethodException, IllegalAccessException; + + static native MethodHandle findGetter(MethodHandles.Lookup lookup, + Class<?> refc, String name, + Class<?> type) + throws NoSuchFieldException, IllegalAccessException; + + static native MethodHandle findSetter(MethodHandles.Lookup lookup, + Class<?> refc, String name, + Class<?> type) + throws NoSuchFieldException, IllegalAccessException; + + static native MethodHandle findStaticGetter(MethodHandles.Lookup lookup, + Class<?> refc, String name, + Class<?> type) + throws NoSuchFieldException, IllegalAccessException; + + static native MethodHandle findStaticSetter(MethodHandles.Lookup lookup, + Class<?> refc, String name, + Class<?> type) + throws NoSuchFieldException, IllegalAccessException; } |