Class FactoryUtil

java.lang.Object
com.sidneysimmons.kimber.util.FactoryUtil

public class FactoryUtil extends Object
Utility class for creating and storing shared/singleton objects.
  • Method Details

    • get

      public static <T> T get(Class<T> clazz)
      Get an object for the given class. The object will be created if it doesn't exist. All requested objects must have a constructor with no arguments.
      Type Parameters:
      T - the type of class to get/create
      Parameters:
      clazz - the class
      Returns:
      the object