Package de.quantummaid.injectmaid
Class InjectMaid
- java.lang.Object
-
- de.quantummaid.injectmaid.InjectMaid
-
- All Implemented Interfaces:
Injector,AutoCloseable
public final class InjectMaid extends Object implements Injector
-
-
Constructor Summary
Constructors Constructor Description InjectMaid()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddInterceptor(SimpleInterceptor interceptor)static InjectMaidBuilderanInjectMaid()static InjectMaidBuilderanInjectMaid(de.quantummaid.reflectmaid.ReflectMaid reflectMaid)booleancanInstantiate(de.quantummaid.reflectmaid.GenericType<?> type)booleancanInstantiate(de.quantummaid.reflectmaid.typescanner.TypeIdentifier type)voidclose()StringdebugInformation()<T> InjectorenterScope(de.quantummaid.reflectmaid.GenericType<T> type, T scopeObject)InjectorenterScope(de.quantummaid.reflectmaid.resolvedtype.ResolvedType resolvedType, Object scopeObject)InjectorenterScope(de.quantummaid.reflectmaid.typescanner.TypeIdentifier typeIdentifier, Object scopeObject)<T> Optional<Injector>enterScopeIfExists(de.quantummaid.reflectmaid.GenericType<T> type, T scopeObject)Optional<Injector>enterScopeIfExists(de.quantummaid.reflectmaid.resolvedtype.ResolvedType resolvedType, Object scopeObject)Optional<Injector>enterScopeIfExists(de.quantummaid.reflectmaid.typescanner.TypeIdentifier typeIdentifier, Object scopeObject)<T> TgetInstance(de.quantummaid.reflectmaid.typescanner.TypeIdentifier type)<T> TimedInstantiation<T>getInstanceWithInitializationTime(de.quantummaid.reflectmaid.GenericType<T> type)<T> TimedInstantiation<T>getInstanceWithInitializationTime(de.quantummaid.reflectmaid.resolvedtype.ResolvedType type)<T> TimedInstantiation<T>getInstanceWithInitializationTime(de.quantummaid.reflectmaid.typescanner.TypeIdentifier type, de.quantummaid.reflectmaid.typescanner.TypeIdentifier rootType)voidinitializeAllSingletons()InstantiationTimesinstantiationTimes()voidoverwriteWith(Injector injector)de.quantummaid.reflectmaid.ReflectMaidreflectMaid()voidregisterExternalObjectToLifecycleManagement(Object object)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.quantummaid.injectmaid.api.Injector
canInstantiate, canInstantiate, enterScope, enterScope, enterScopeIfExists, enterScopeIfExists, getInstance, getInstance, getInstance, getInstanceWithInitializationTime, overwriteWith
-
-
-
-
Method Detail
-
anInjectMaid
public static InjectMaidBuilder anInjectMaid()
-
anInjectMaid
public static InjectMaidBuilder anInjectMaid(de.quantummaid.reflectmaid.ReflectMaid reflectMaid)
-
initializeAllSingletons
public void initializeAllSingletons()
- Specified by:
initializeAllSingletonsin interfaceInjector
-
enterScope
public <T> Injector enterScope(de.quantummaid.reflectmaid.GenericType<T> type, T scopeObject)
- Specified by:
enterScopein interfaceInjector
-
enterScope
public Injector enterScope(de.quantummaid.reflectmaid.resolvedtype.ResolvedType resolvedType, Object scopeObject)
- Specified by:
enterScopein interfaceInjector
-
enterScope
public Injector enterScope(de.quantummaid.reflectmaid.typescanner.TypeIdentifier typeIdentifier, Object scopeObject)
- Specified by:
enterScopein interfaceInjector
-
enterScopeIfExists
public <T> Optional<Injector> enterScopeIfExists(de.quantummaid.reflectmaid.GenericType<T> type, T scopeObject)
- Specified by:
enterScopeIfExistsin interfaceInjector
-
enterScopeIfExists
public Optional<Injector> enterScopeIfExists(de.quantummaid.reflectmaid.resolvedtype.ResolvedType resolvedType, Object scopeObject)
- Specified by:
enterScopeIfExistsin interfaceInjector
-
enterScopeIfExists
public Optional<Injector> enterScopeIfExists(de.quantummaid.reflectmaid.typescanner.TypeIdentifier typeIdentifier, Object scopeObject)
-
addInterceptor
public void addInterceptor(SimpleInterceptor interceptor)
- Specified by:
addInterceptorin interfaceInjector
-
overwriteWith
public void overwriteWith(Injector injector)
- Specified by:
overwriteWithin interfaceInjector
-
getInstance
public <T> T getInstance(de.quantummaid.reflectmaid.typescanner.TypeIdentifier type)
- Specified by:
getInstancein interfaceInjector
-
getInstanceWithInitializationTime
public <T> TimedInstantiation<T> getInstanceWithInitializationTime(de.quantummaid.reflectmaid.GenericType<T> type)
- Specified by:
getInstanceWithInitializationTimein interfaceInjector
-
getInstanceWithInitializationTime
public <T> TimedInstantiation<T> getInstanceWithInitializationTime(de.quantummaid.reflectmaid.resolvedtype.ResolvedType type)
-
getInstanceWithInitializationTime
public <T> TimedInstantiation<T> getInstanceWithInitializationTime(de.quantummaid.reflectmaid.typescanner.TypeIdentifier type, de.quantummaid.reflectmaid.typescanner.TypeIdentifier rootType)
-
canInstantiate
public boolean canInstantiate(de.quantummaid.reflectmaid.GenericType<?> type)
- Specified by:
canInstantiatein interfaceInjector
-
canInstantiate
public boolean canInstantiate(de.quantummaid.reflectmaid.typescanner.TypeIdentifier type)
- Specified by:
canInstantiatein interfaceInjector
-
debugInformation
public String debugInformation()
-
instantiationTimes
public InstantiationTimes instantiationTimes()
-
registerExternalObjectToLifecycleManagement
public void registerExternalObjectToLifecycleManagement(Object object)
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceInjector
-
reflectMaid
public de.quantummaid.reflectmaid.ReflectMaid reflectMaid()
- Specified by:
reflectMaidin interfaceInjector
-
-