Package play.utils

Class Java


  • public class Java
    extends java.lang.Object
    Java utils
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static play.utils.JavaWithCaching _javaWithCaching  
    • Constructor Summary

      Constructors 
      Constructor Description
      Java()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Object deserialize​(byte[] b)  
      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
      protected static play.utils.JavaWithCaching getJavaWithCaching()  
      static java.lang.String[] parameterNames​(java.lang.reflect.Method method)
      Retrieve parameter names of a method
      static byte[] serialize​(java.lang.Object o)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • _javaWithCaching

        protected static play.utils.JavaWithCaching _javaWithCaching
    • Constructor Detail

      • Java

        public Java()
    • Method Detail

      • getJavaWithCaching

        protected static play.utils.JavaWithCaching getJavaWithCaching()
      • parameterNames

        public static java.lang.String[] parameterNames​(java.lang.reflect.Method method)
        Retrieve parameter names of a method
        Parameters:
        method - The given method
        Returns:
        Array of parameter names
      • findAllAnnotatedMethods

        public 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
        Parameters:
        clazz - The class
        annotationType - The annotation class
        Returns:
        A list of method object
      • serialize

        public static byte[] serialize​(java.lang.Object o)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • deserialize

        public static java.lang.Object deserialize​(byte[] b)
                                            throws java.io.IOException,
                                                   java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException