Package de.quantummaid.injectmaid.api
Interface Injector
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
InjectMaid
public interface Injector extends AutoCloseable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddInterceptor(SimpleInterceptor interceptor)booleancanInstantiate(de.quantummaid.reflectmaid.GenericType<?> type)default booleancanInstantiate(de.quantummaid.reflectmaid.resolvedtype.ResolvedType type)booleancanInstantiate(de.quantummaid.reflectmaid.typescanner.TypeIdentifier type)default booleancanInstantiate(Class<?> type)voidclose()<T> InjectorenterScope(de.quantummaid.reflectmaid.GenericType<T> scopeType, T scopeObject)default InjectorenterScope(de.quantummaid.reflectmaid.resolvedtype.ResolvedType scopeType, Object scopeObject)InjectorenterScope(de.quantummaid.reflectmaid.typescanner.TypeIdentifier scopeType, Object scopeObject)default <T> InjectorenterScope(Class<T> scopeType, T scopeObject)default InjectorenterScope(Object scopeObject)<T> Optional<Injector>enterScopeIfExists(de.quantummaid.reflectmaid.GenericType<T> scopeType, T scopeObject)Optional<Injector>enterScopeIfExists(de.quantummaid.reflectmaid.resolvedtype.ResolvedType resolvedType, Object scopeObject)default <T> Optional<Injector>enterScopeIfExists(Class<T> scopeType, T scopeObject)default Optional<Injector>enterScopeIfExists(Object scopeObject)default <T> TgetInstance(de.quantummaid.reflectmaid.GenericType<T> type)default <T> TgetInstance(de.quantummaid.reflectmaid.resolvedtype.ResolvedType type)<T> TgetInstance(de.quantummaid.reflectmaid.typescanner.TypeIdentifier type)default <T> TgetInstance(Class<T> type)<T> TimedInstantiation<T>getInstanceWithInitializationTime(de.quantummaid.reflectmaid.GenericType<T> type)default <T> TimedInstantiation<T>getInstanceWithInitializationTime(Class<T> type)voidinitializeAllSingletons()voidoverwriteWith(Injector injector)default voidoverwriteWith(InjectorConfiguration injectorConfiguration)de.quantummaid.reflectmaid.ReflectMaidreflectMaid()
-
-
-
Method Detail
-
getInstance
default <T> T getInstance(Class<T> type)
-
getInstance
default <T> T getInstance(de.quantummaid.reflectmaid.GenericType<T> type)
-
getInstance
default <T> T getInstance(de.quantummaid.reflectmaid.resolvedtype.ResolvedType type)
-
getInstance
<T> T getInstance(de.quantummaid.reflectmaid.typescanner.TypeIdentifier type)
-
getInstanceWithInitializationTime
default <T> TimedInstantiation<T> getInstanceWithInitializationTime(Class<T> type)
-
getInstanceWithInitializationTime
<T> TimedInstantiation<T> getInstanceWithInitializationTime(de.quantummaid.reflectmaid.GenericType<T> type)
-
initializeAllSingletons
void initializeAllSingletons()
-
enterScope
<T> Injector enterScope(de.quantummaid.reflectmaid.GenericType<T> scopeType, T scopeObject)
-
enterScope
default Injector enterScope(de.quantummaid.reflectmaid.resolvedtype.ResolvedType scopeType, Object scopeObject)
-
enterScope
Injector enterScope(de.quantummaid.reflectmaid.typescanner.TypeIdentifier scopeType, Object scopeObject)
-
enterScopeIfExists
default <T> Optional<Injector> enterScopeIfExists(Class<T> scopeType, T scopeObject)
-
enterScopeIfExists
<T> Optional<Injector> enterScopeIfExists(de.quantummaid.reflectmaid.GenericType<T> scopeType, T scopeObject)
-
enterScopeIfExists
Optional<Injector> enterScopeIfExists(de.quantummaid.reflectmaid.resolvedtype.ResolvedType resolvedType, Object scopeObject)
-
addInterceptor
void addInterceptor(SimpleInterceptor interceptor)
-
overwriteWith
default void overwriteWith(InjectorConfiguration injectorConfiguration)
-
overwriteWith
void overwriteWith(Injector injector)
-
canInstantiate
default boolean canInstantiate(Class<?> type)
-
canInstantiate
boolean canInstantiate(de.quantummaid.reflectmaid.GenericType<?> type)
-
canInstantiate
default boolean canInstantiate(de.quantummaid.reflectmaid.resolvedtype.ResolvedType type)
-
canInstantiate
boolean canInstantiate(de.quantummaid.reflectmaid.typescanner.TypeIdentifier type)
-
close
void close()
- Specified by:
closein interfaceAutoCloseable
-
reflectMaid
de.quantummaid.reflectmaid.ReflectMaid reflectMaid()
-
-