Package org.opt4j.start
Class Opt4JModule
java.lang.Object
com.google.inject.AbstractModule
org.opt4j.start.Opt4JModule
- All Implemented Interfaces:
com.google.inject.Module
- Direct Known Subclasses:
ArchiveModule,ConstraintDominationModule,CoolingScheduleModule,IndividualCompleterModule,MatingModule,NormalizerModule,OperatorModule,OptimizerModule,ProblemModule,RandomModule,SelectorModule,VisualizationModule
public abstract class Opt4JModule
extends com.google.inject.AbstractModule
The
Opt4JModule is the superclass for all modules.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddControlListener(Class<? extends ControlListener> listener) Adds anControlListener.voidaddIndividualStateListener(Class<? extends IndividualStateListener> listener) Adds anIndividualStateListener.voidaddOptimizerIterationListener(Class<? extends OptimizerIterationListener> listener) Adds anOptimizerIterationListener.voidaddOptimizerStateListener(Class<? extends OptimizerStateListener> listener) Adds anOptimizerStateListener.protected com.google.inject.binder.ConstantBindingBuilderbindConstant(Annotation annotation) Bind a value.protected com.google.inject.binder.ConstantBindingBuilderbindConstant(Class<? extends Annotation> annotation) Bind a value.protected com.google.inject.binder.ConstantBindingBuilderbindConstant(String value) Bind aConstant.protected com.google.inject.binder.ConstantBindingBuilderbindConstant(String value, Class<?> namespace) Bind a constant.protected abstract voidconfig()Configure the module.protected voidstatic org.opt4j.start.Opt4JModule.ConstantImplReturns the implementation of theConstantannotation.voidMethods inherited from class com.google.inject.AbstractModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
-
Field Details
-
SINGLETON
public static com.google.inject.Scope SINGLETONThe singleton scope.
-
-
Constructor Details
-
Opt4JModule
public Opt4JModule()
-
-
Method Details
-
bindConstant
protected com.google.inject.binder.ConstantBindingBuilder bindConstant(Class<? extends Annotation> annotation) Bind a value.- Parameters:
annotation- the type of annotation of the value- Returns:
- the constant binding builder that allows a binding
-
bindConstant
Bind a value.- Parameters:
annotation- the annotation of the value- Returns:
- the constant binding builder that allows a binding
-
configure
protected void configure()- Specified by:
configurein classcom.google.inject.AbstractModule
-
multi
-
config
protected abstract void config()Configure the module. Bind constants, listeners, and bind arbitrary classes.- See Also:
-
Binder
-
constant
Returns the implementation of theConstantannotation.- Parameters:
value- the valuenamespace- the namespace- Returns:
- the constant annotation
-
bindConstant
Bind aConstant.- Parameters:
value- the value from theConstantannotation with an empty namespace- Returns:
- the constant binding builder that allows a binding
-
bindConstant
protected com.google.inject.binder.ConstantBindingBuilder bindConstant(String value, Class<?> namespace) Bind a constant. -
addOptimizerStateListener
Adds anOptimizerStateListener.- Parameters:
listener- the listener to be added
-
addOptimizerIterationListener
Adds anOptimizerIterationListener.- Parameters:
listener- the listener to be added
-
addIndividualStateListener
Adds anIndividualStateListener.- Parameters:
listener- the listener to be added
-
addControlListener
Adds anControlListener.- Parameters:
listener- the listener to be added
-