Class InstanceHolder


  • public class InstanceHolder
    extends java.lang.Object
    The Class InstanceHolder.
    • Constructor Summary

      Constructors 
      Constructor Description
      InstanceHolder()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> boolean contains​(java.lang.Class<T> key)
      Contains.
      static <T> T get​(java.lang.Class<T> key)
      Gets the.
      static <T> void put​(T instance, java.lang.Class<T> key)
      Put.
      • Methods inherited from class java.lang.Object

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

      • InstanceHolder

        public InstanceHolder()
    • Method Detail

      • put

        public static <T> void put​(T instance,
                                   java.lang.Class<T> key)
        Put.
        Type Parameters:
        T - the generic type
        Parameters:
        instance - the instance
        key - the key
      • contains

        public static <T> boolean contains​(java.lang.Class<T> key)
        Contains.
        Type Parameters:
        T - the generic type
        Parameters:
        key - the key
        Returns:
        true, if successful
      • get

        public static <T> T get​(java.lang.Class<T> key)
        Gets the.
        Type Parameters:
        T - the generic type
        Parameters:
        key - the key
        Returns:
        the t