Package org.iworkz.genesis.impl
Class AbstractModule
java.lang.Object
org.iworkz.genesis.impl.AbstractModule
- All Implemented Interfaces:
Module
- Direct Known Subclasses:
DefaultModule
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddDependency(Module moduleClass) protected <T> Binding<T>protected voidbindScope(Class<?> scopeAnnotationClass, ScopeContext scopeClass) protected voidbindSingletonScope(Class<? extends Annotation> singletonAnnotationClass) protected voidbindValueSupplier(Class<? extends Annotation> supplierAnnotationClass, ValueSupplier<?, ?> valueSupplier) voidprotected static <T extends Module>
TgetInstance(Class<T> moduleClass) intMap<Class<?>,ScopeContext> List<Class<? extends Annotation>>protected ImplementationClassProcessorprotected ImplementationFinderprotected PostProcessorMap<Class<? extends Annotation>,ValueSupplier<?, ?>> protected voidpostProcess(Object instance, Set<Object> injectedObjects) protected voidregisterClassLoader(ClassLoader classLoader) protected voidregisterImplementationClassProcessor(ImplementationClassProcessor implementationClassProcessor) protected voidregisterImplementationFinder(ImplementationFinder implementationFinder) protected voidregisterPostProcessor(PostProcessor postProcessor) voidsetRanking(int ranking)
-
Field Details
-
dependencies
-
-
Constructor Details
-
AbstractModule
public AbstractModule()
-
-
Method Details
-
getInstance
-
configure
public void configure() -
getStandardImplementationFinder
-
getStandardPostProcessor
-
getStandardImplementationClassProcessor
-
registerImplementationFinder
-
registerImplementationClassProcessor
protected void registerImplementationClassProcessor(ImplementationClassProcessor implementationClassProcessor) -
getImplementationClassProcessors
- Specified by:
getImplementationClassProcessorsin interfaceModule
-
getImplementationFinders
- Specified by:
getImplementationFindersin interfaceModule
-
addDependency
-
getDependencies
- Specified by:
getDependenciesin interfaceModule
-
bind
-
bindScope
-
bindSingletonScope
-
bindValueSupplier
protected void bindValueSupplier(Class<? extends Annotation> supplierAnnotationClass, ValueSupplier<?, ?> valueSupplier) -
getBindings
- Specified by:
getBindingsin interfaceModule
-
getValueSuppliers
- Specified by:
getValueSuppliersin interfaceModule
-
getSingletonScopes
- Specified by:
getSingletonScopesin interfaceModule
-
registerClassLoader
-
getClassLoaders
- Specified by:
getClassLoadersin interfaceModule
-
registerPostProcessor
-
getPostProcessors
- Specified by:
getPostProcessorsin interfaceModule
-
getRanking
public int getRanking()- Specified by:
getRankingin interfaceModule
-
setRanking
public void setRanking(int ranking) - Specified by:
setRankingin interfaceModule
-
postProcess
-
getScopes
-