Class Reflection
- java.lang.Object
-
- io.prestosql.util.Reflection
-
public final class Reflection extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MethodHandle
constructorMethodHandle(StandardErrorCode errorCode, Class<?> clazz, Class<?>... parameterTypes)
Returns a MethodHandle corresponding to the specified constructor.static MethodHandle
constructorMethodHandle(StandardErrorCode errorCode, Constructor<?> constructor)
Returns a MethodHandle corresponding to the specified constructor.static MethodHandle
constructorMethodHandle(Class<?> clazz, Class<?>... parameterTypes)
Returns a MethodHandle corresponding to the specified constructor.static Field
field(Class<?> clazz, String name)
static Method
method(Class<?> clazz, String name, Class<?>... parameterTypes)
static MethodHandle
methodHandle(StandardErrorCode errorCode, Method method)
Returns a MethodHandle corresponding to the specified method.static MethodHandle
methodHandle(Class<?> clazz, String name, Class<?>... parameterTypes)
Returns a MethodHandle corresponding to the specified method.static MethodHandle
methodHandle(Method method)
Returns a MethodHandle corresponding to the specified method.
-
-
-
Method Detail
-
methodHandle
public static MethodHandle methodHandle(Class<?> clazz, String name, Class<?>... parameterTypes)
Returns a MethodHandle corresponding to the specified method.Warning: The way Oracle JVM implements producing MethodHandle for a method involves creating JNI global weak references. G1 processes such references serially. As a result, calling this method in a tight loop can create significant GC pressure and significantly increase application pause time.
-
methodHandle
public static MethodHandle methodHandle(StandardErrorCode errorCode, Method method)
Returns a MethodHandle corresponding to the specified method.Warning: The way Oracle JVM implements producing MethodHandle for a method involves creating JNI global weak references. G1 processes such references serially. As a result, calling this method in a tight loop can create significant GC pressure and significantly increase application pause time.
-
methodHandle
public static MethodHandle methodHandle(Method method)
Returns a MethodHandle corresponding to the specified method.Warning: The way Oracle JVM implements producing MethodHandle for a method involves creating JNI global weak references. G1 processes such references serially. As a result, calling this method in a tight loop can create significant GC pressure and significantly increase application pause time.
-
constructorMethodHandle
public static MethodHandle constructorMethodHandle(Class<?> clazz, Class<?>... parameterTypes)
Returns a MethodHandle corresponding to the specified constructor.Warning: The way Oracle JVM implements producing MethodHandle for a constructor involves creating JNI global weak references. G1 processes such references serially. As a result, calling this method in a tight loop can create significant GC pressure and significantly increase application pause time.
-
constructorMethodHandle
public static MethodHandle constructorMethodHandle(StandardErrorCode errorCode, Class<?> clazz, Class<?>... parameterTypes)
Returns a MethodHandle corresponding to the specified constructor.Warning: The way Oracle JVM implements producing MethodHandle for a constructor involves creating JNI global weak references. G1 processes such references serially. As a result, calling this method in a tight loop can create significant GC pressure and significantly increase application pause time.
-
constructorMethodHandle
public static MethodHandle constructorMethodHandle(StandardErrorCode errorCode, Constructor<?> constructor)
Returns a MethodHandle corresponding to the specified constructor.Warning: The way Oracle JVM implements producing MethodHandle for a constructor involves creating JNI global weak references. G1 processes such references serially. As a result, calling this method in a tight loop can create significant GC pressure and significantly increase application pause time.
-
-