Class Memory


  • public class Memory
    extends java.lang.Object
    This class provides a method to allocate memory for objects of given classes without calling a constructor.
    Author:
    homac
    • Constructor Summary

      Constructors 
      Constructor Description
      Memory()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> T newInstance​(java.lang.Class<T> clazz)
      Instantiates an object of type T without calling a constructor.
      • Methods inherited from class java.lang.Object

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

      • Memory

        public Memory()
    • Method Detail

      • newInstance

        public static <T> T newInstance​(java.lang.Class<T> clazz)
                                 throws java.lang.InstantiationException
        Instantiates an object of type T without calling a constructor.
        Throws:
        java.lang.InstantiationException