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)default booleancanInstantiate(de.quantummaid.reflectmaid.GenericType<?> type)booleancanInstantiate(de.quantummaid.reflectmaid.ResolvedType resolvedType)default booleancanInstantiate(Class<?> type)voidclose()default <T> InjectorenterScope(de.quantummaid.reflectmaid.GenericType<T> scopeType, T scopeObject)InjectorenterScope(de.quantummaid.reflectmaid.ResolvedType resolvedType, Object scopeObject)default <T> InjectorenterScope(Class<T> scopeType, T scopeObject)default InjectorenterScope(Object scopeObject)default <T> TgetInstance(de.quantummaid.reflectmaid.GenericType<T> genericType)ObjectgetInstance(de.quantummaid.reflectmaid.ResolvedType type)default <T> TgetInstance(Class<T> type)voidinitializeAllSingletons()voidoverwriteWith(Injector injector)
-
-
-
Method Detail
-
getInstance
default <T> T getInstance(Class<T> type)
-
getInstance
default <T> T getInstance(de.quantummaid.reflectmaid.GenericType<T> genericType)
-
getInstance
Object getInstance(de.quantummaid.reflectmaid.ResolvedType type)
-
initializeAllSingletons
void initializeAllSingletons()
-
enterScope
default <T> Injector enterScope(de.quantummaid.reflectmaid.GenericType<T> scopeType, T scopeObject)
-
enterScope
Injector enterScope(de.quantummaid.reflectmaid.ResolvedType resolvedType, Object scopeObject)
-
addInterceptor
void addInterceptor(SimpleInterceptor interceptor)
-
overwriteWith
void overwriteWith(Injector injector)
-
canInstantiate
default boolean canInstantiate(Class<?> type)
-
canInstantiate
default boolean canInstantiate(de.quantummaid.reflectmaid.GenericType<?> type)
-
canInstantiate
boolean canInstantiate(de.quantummaid.reflectmaid.ResolvedType resolvedType)
-
close
void close()
- Specified by:
closein interfaceAutoCloseable
-
-