Package io.vertigo.core.util
Class InjectorUtil
- java.lang.Object
-
- io.vertigo.core.util.InjectorUtil
-
public final class InjectorUtil extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
injectMembers(Object instance)
Inject dependencies in the instance using the current App ComponentSpace as container.static <T> T
newInstance(Class<T> clazz)
Creates an new object instance of the given class and inject dependencies using the current App ComponentSpace as container.
-
-
-
Method Detail
-
newInstance
public static <T> T newInstance(Class<T> clazz)
Creates an new object instance of the given class and inject dependencies using the current App ComponentSpace as container. This created object is not registered in the ComponantSpace. Therefore the clazz cannot implement the interface Activeable because the lifecycle of this component is not handled by Vertigo.- Parameters:
clazz
- the clazz of the object your want to create with it's member injected.- Returns:
- the newly created object.
-
injectMembers
public static void injectMembers(Object instance)
Inject dependencies in the instance using the current App ComponentSpace as container.- Parameters:
instance
- the object your want to get it's member injected.
-
-