Package io.vertigo.core.util
Class InjectorUtil
java.lang.Object
io.vertigo.core.util.InjectorUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidinjectMembers(Object instance) Inject dependencies in the instance using the current App ComponentSpace as container.static <T> TnewInstance(Class<T> clazz) Creates an new object instance of the given class and inject dependencies using the current App ComponentSpace as container.
-
Method Details
-
newInstance
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
Inject dependencies in the instance using the current App ComponentSpace as container.- Parameters:
instance- the object your want to get it's member injected.
-