public class Java
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Java.FieldWrapper
Field accessor set and get value for a property, using the getter/setter when it exists or direct access
otherwise. final, native or static properties are safely ignored
|
Modifier and Type | Field and Description |
---|---|
protected static play.utils.JavaWithCaching |
_javaWithCaching |
protected static ApplicationClassloaderState |
_lastKnownApplicationClassloaderState |
Constructor and Description |
---|
Java() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
deserialize(byte[] b) |
static java.lang.String[] |
extractInfosFromByteCode(byte[] code) |
static java.lang.Object |
extractUnderlyingCallable(java.util.concurrent.FutureTask<?> futureTask)
Try to discover what is hidden under a FutureTask (hack)
Field sync first, if not present will try field callable
|
static java.util.List<java.lang.reflect.Method> |
findAllAnnotatedMethods(java.lang.Class<?> clazz,
java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Find all annotated method from a class
|
static java.util.List<java.lang.reflect.Method> |
findAllAnnotatedMethods(java.util.List<java.lang.Class> classes,
java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Find all annotated method from a class
|
static void |
findAllFields(java.lang.Class clazz,
java.util.Set<java.lang.reflect.Field> found) |
static Java.FieldWrapper |
getFieldWrapper(java.lang.reflect.Field field) |
protected static play.utils.JavaWithCaching |
getJavaWithCaching() |
static java.lang.Object |
invokeChildOrStatic(java.lang.Class<?> clazz,
java.lang.String method,
java.lang.Object... args) |
static java.lang.Object |
invokeStatic(java.lang.Class<?> clazz,
java.lang.String method)
Invoke a static method
|
static java.lang.Object |
invokeStatic(java.lang.Class<?> clazz,
java.lang.String method,
java.lang.Object... args)
Invoke a static method with args
|
static java.lang.Object |
invokeStatic(java.lang.reflect.Method method,
java.util.Map<java.lang.String,java.lang.String[]> args) |
static java.lang.Object |
invokeStatic(java.lang.reflect.Method method,
java.lang.Object[] args) |
static java.lang.Object |
invokeStatic(java.lang.String clazz,
java.lang.String method) |
static java.lang.Object |
invokeStaticOrParent(java.lang.Class<?> clazz,
java.lang.String method,
java.lang.Object... args) |
static java.lang.String[] |
parameterNames(java.lang.reflect.Method method)
Retrieve parameter names of a method
|
static java.lang.String |
rawJavaType(java.lang.Class clazz) |
static java.lang.String |
rawMethodSignature(java.lang.reflect.Method method) |
static byte[] |
serialize(java.lang.Object o) |
protected static play.utils.JavaWithCaching _javaWithCaching
protected static ApplicationClassloaderState _lastKnownApplicationClassloaderState
protected static play.utils.JavaWithCaching getJavaWithCaching()
public static java.lang.String[] extractInfosFromByteCode(byte[] code)
public static java.lang.Object extractUnderlyingCallable(java.util.concurrent.FutureTask<?> futureTask)
Field sync first, if not present will try field callable
futureTask
- The given tackpublic static java.lang.Object invokeStatic(java.lang.Class<?> clazz, java.lang.String method) throws java.lang.Exception
clazz
- The classmethod
- The method namejava.lang.Exception
- if problem occurred during invokingpublic static java.lang.Object invokeStatic(java.lang.String clazz, java.lang.String method) throws java.lang.Exception
java.lang.Exception
public static java.lang.Object invokeStatic(java.lang.Class<?> clazz, java.lang.String method, java.lang.Object... args) throws java.lang.Exception
clazz
- The classmethod
- The method nameargs
- Argumentsjava.lang.Exception
- if problem occurred during invokingpublic static java.lang.Object invokeStaticOrParent(java.lang.Class<?> clazz, java.lang.String method, java.lang.Object... args) throws java.lang.Exception
java.lang.Exception
public static java.lang.Object invokeChildOrStatic(java.lang.Class<?> clazz, java.lang.String method, java.lang.Object... args) throws java.lang.Exception
java.lang.Exception
public static java.lang.Object invokeStatic(java.lang.reflect.Method method, java.util.Map<java.lang.String,java.lang.String[]> args) throws java.lang.Exception
java.lang.Exception
public static java.lang.Object invokeStatic(java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Exception
java.lang.Exception
public static java.lang.String[] parameterNames(java.lang.reflect.Method method) throws java.lang.Exception
method
- The given methodjava.lang.Exception
- if problem occurred during invokingpublic static java.lang.String rawMethodSignature(java.lang.reflect.Method method)
public static java.lang.String rawJavaType(java.lang.Class clazz)
public static java.util.List<java.lang.reflect.Method> findAllAnnotatedMethods(java.lang.Class<?> clazz, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
clazz
- The classannotationType
- The annotation classpublic static java.util.List<java.lang.reflect.Method> findAllAnnotatedMethods(java.util.List<java.lang.Class> classes, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
classes
- The classesannotationType
- The annotation classpublic static void findAllFields(java.lang.Class clazz, java.util.Set<java.lang.reflect.Field> found)
public static Java.FieldWrapper getFieldWrapper(java.lang.reflect.Field field)
public static byte[] serialize(java.lang.Object o) throws java.io.IOException
java.io.IOException
public static java.lang.Object deserialize(byte[] b) throws java.lang.Exception
java.lang.Exception
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly