Package 

Object InstanceCreator

    • Method Summary

      Modifier and Type Method Description
      final static <T extends Any> T create(Class<out T> clazz, Function0<T> fallback) Create an instance of clazz
      final static <T extends Any> T create(Class<out T> clazz)
      final static <T extends Any> List<T> create(Collection<Class<out T>> classes) Create instances of the given classes
      • Methods inherited from class java.lang.Object

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

      • create

         final static <T extends Any> T create(Class<out T> clazz, Function0<T> fallback)

        Create an instance of clazz

        Parameters:
        clazz - the clazz to create an instance of
        fallback - a value provider which provides a fallback in case of a failure
      • create

         final static <T extends Any> List<T> create(Collection<Class<out T>> classes)

        Create instances of the given classes

        Parameters:
        classes - the classes to create insatnces of