Class Singleton


  • public class Singleton
    extends java.lang.Object
    Singleton helper class
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static Singleton instance  
      private java.util.Map<java.lang.Class,​java.lang.Object> mapHolder  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Singleton()  
    • Method Summary

      Modifier and Type Method Description
      static <T> T getInstance​(java.lang.Class<T> tClass)  
      • Methods inherited from class java.lang.Object

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

      • instance

        private static final Singleton instance
      • mapHolder

        private final java.util.Map<java.lang.Class,​java.lang.Object> mapHolder
    • Constructor Detail

      • Singleton

        private Singleton()
    • Method Detail

      • getInstance

        public static <T> T getInstance​(java.lang.Class<T> tClass)
                                 throws java.lang.NoSuchMethodException,
                                        java.lang.reflect.InvocationTargetException,
                                        java.lang.IllegalAccessException,
                                        java.lang.InstantiationException
        Throws:
        java.lang.NoSuchMethodException
        java.lang.reflect.InvocationTargetException
        java.lang.IllegalAccessException
        java.lang.InstantiationException