public abstract class Opt4JModule
extends com.google.inject.AbstractModule
Opt4JModule is the superclass for all modules. The class and its
fields might be extended with certain annotations. See Constant and the
org.opt4j.core.config.annotations package.| Modifier and Type | Field and Description |
|---|---|
static com.google.inject.Scope |
SINGLETON
The singleton scope.
|
| Constructor and Description |
|---|
Opt4JModule() |
| Modifier and Type | Method and Description |
|---|---|
void |
addControlListener(java.lang.Class<? extends ControlListener> listener)
Adds an
ControlListener. |
void |
addIndividualStateListener(java.lang.Class<? extends IndividualStateListener> listener)
Adds an
IndividualStateListener. |
void |
addOptimizerIterationListener(java.lang.Class<? extends OptimizerIterationListener> listener)
Adds an
OptimizerIterationListener. |
void |
addOptimizerStateListener(java.lang.Class<? extends OptimizerStateListener> listener)
Adds an
OptimizerStateListener. |
com.google.inject.binder.ConstantBindingBuilder |
bindConstant(java.lang.annotation.Annotation annotation)
Bind a value.
|
com.google.inject.binder.ConstantBindingBuilder |
bindConstant(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Bind a value.
|
protected com.google.inject.binder.ConstantBindingBuilder |
bindConstant(java.lang.String value)
Bind a
Constant. |
com.google.inject.binder.ConstantBindingBuilder |
bindConstant(java.lang.String value,
java.lang.Class<?> namespace)
Bind a constant.
|
protected abstract void |
config()
Configure the module.
|
protected void |
configure() |
static org.opt4j.core.start.Opt4JModule.ConstantImpl |
constant(java.lang.String value,
java.lang.Class<?> namespace)
Returns the implementation of the
Constant annotation. |
protected void |
multi(java.lang.Class<?> clazz) |
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBindingpublic com.google.inject.binder.ConstantBindingBuilder bindConstant(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
annotation - the type of annotation of the valuepublic com.google.inject.binder.ConstantBindingBuilder bindConstant(java.lang.annotation.Annotation annotation)
annotation - the annotation of the valueprotected void configure()
configure in class com.google.inject.AbstractModuleprotected void multi(java.lang.Class<?> clazz)
protected abstract void config()
Binderpublic static org.opt4j.core.start.Opt4JModule.ConstantImpl constant(java.lang.String value,
java.lang.Class<?> namespace)
Constant annotation.value - the valuenamespace - the namespaceprotected com.google.inject.binder.ConstantBindingBuilder bindConstant(java.lang.String value)
Constant.value - the value from the Constant annotation with an empty
namespacepublic com.google.inject.binder.ConstantBindingBuilder bindConstant(java.lang.String value,
java.lang.Class<?> namespace)
public void addOptimizerStateListener(java.lang.Class<? extends OptimizerStateListener> listener)
OptimizerStateListener.listener - the listener to be addedpublic void addOptimizerIterationListener(java.lang.Class<? extends OptimizerIterationListener> listener)
OptimizerIterationListener.listener - the listener to be addedpublic void addIndividualStateListener(java.lang.Class<? extends IndividualStateListener> listener)
IndividualStateListener.listener - the listener to be addedpublic void addControlListener(java.lang.Class<? extends ControlListener> listener)
ControlListener.listener - the listener to be added