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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addControlListener
(Class<? extends ControlListener> listener) Adds anControlListener
.void
addIndividualStateListener
(Class<? extends IndividualStateListener> listener) Adds anIndividualStateListener
.void
addOptimizerIterationListener
(Class<? extends OptimizerIterationListener> listener) Adds anOptimizerIterationListener
.void
addOptimizerStateListener
(Class<? extends OptimizerStateListener> listener) Adds anOptimizerStateListener
.protected com.google.inject.binder.ConstantBindingBuilder
bindConstant
(Annotation annotation) Bind a value.protected com.google.inject.binder.ConstantBindingBuilder
bindConstant
(Class<? extends Annotation> annotation) Bind a value.protected com.google.inject.binder.ConstantBindingBuilder
bindConstant
(String value) Bind aConstant
.protected com.google.inject.binder.ConstantBindingBuilder
bindConstant
(String value, Class<?> namespace) Bind a constant.protected abstract void
config()
Configure the module.protected void
static org.opt4j.start.Opt4JModule.ConstantImpl
Returns the implementation of theConstant
annotation.void
Methods 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:
configure
in 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 theConstant
annotation.- Parameters:
value
- the valuenamespace
- the namespace- Returns:
- the constant annotation
-
bindConstant
Bind aConstant
.- Parameters:
value
- the value from theConstant
annotation 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
-