Class WicketObjects

    • Method Detail

      • resolveClass

        public static <T> Class<T> resolveClass​(String className)
        Type Parameters:
        T - class type
        Parameters:
        className - Class to resolve
        Returns:
        Resolved class
      • cloneObject

        public static <T> T cloneObject​(T object)
        Makes a deep clone of an object by serializing and deserializing it. The object must be fully serializable to be cloned. No extra debug info is gathered.
        Parameters:
        object - The object to clone
        Returns:
        A deep copy of the object
      • newInstance

        public static <T> T newInstance​(String className)
        Creates a new instance using the current application's class resolver. Returns null if className is null.
        Parameters:
        className - The full class name
        Returns:
        The new object instance
      • sizeof

        public static long sizeof​(Serializable object)
        Computes the size of an object. Note that this is an estimation, never an absolute accurate size.
        Parameters:
        object - Object to compute size of
        Returns:
        The size of the object in bytes