-
public final class DI
-
-
Method Summary
Modifier and Type Method Description static DIgetInstance()static voidreset()synchronized <T> TgetSingletonInstance(Class<T> key)Return the instance of a singleton if it exists, null otherwise synchronized <T> voidaddSingletonInstance(Class<T> key, T instance)Return the instance of a singleton if it exists, null otherwise -
-
Method Detail
-
getInstance
static DI getInstance()
-
reset
static void reset()
-
getSingletonInstance
@Nullable() synchronized <T> T getSingletonInstance(Class<T> key)
Return the instance of a singleton if it exists, null otherwise
-
addSingletonInstance
@Nullable() synchronized <T> void addSingletonInstance(Class<T> key, T instance)
Return the instance of a singleton if it exists, null otherwise
-
-
-
-