Package org.opt4j.config
Class PropertyModule
java.lang.Object
org.opt4j.config.PropertyModule
- All Implemented Interfaces:
com.google.inject.Module,Serializable,Comparable<PropertyModule>
public final class PropertyModule
extends Object
implements com.google.inject.Module, Serializable, Comparable<PropertyModule>
The
PropertyModule is a decorator for a Module that enables
property methods.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPropertyModule(com.google.inject.Module module) Constructs aPropertyModulethat decorates aModule. -
Method Summary
Modifier and TypeMethodDescriptionclone()intcompareTo(PropertyModule other) voidconfigure(com.google.inject.Binder binder) booleangetConfiguration(Document document) Returns the configuration of thePropertyModuleas XMLNode.com.google.inject.ModuleReturns the decoratedModule.Returns the properties.getProperty(String name) Returns thePropertywith the specifiedname.inthashCode()voidsetConfiguration(Node node) Configures aPropertyModulewith an XMLNode.static ObjecttoEnumElement(String name, Class<? extends Enum> type) Converts a String to an element of a given enumeration.toString()
-
Field Details
-
module
protected final com.google.inject.Module module -
properties
-
c
protected static int c -
id
public final int id
-
-
Constructor Details
-
PropertyModule
public PropertyModule(com.google.inject.Module module) Constructs aPropertyModulethat decorates aModule.- Parameters:
module- the decorated module
-
-
Method Details
-
toEnumElement
Converts a String to an element of a given enumeration.- Parameters:
name- the name of the elementtype- the enumeration type- Returns:
- the element of the enumeration
-
configure
public void configure(com.google.inject.Binder binder) - Specified by:
configurein interfacecom.google.inject.Module
-
getModule
public com.google.inject.Module getModule()Returns the decoratedModule.- Returns:
- the module
-
getProperty
Returns thePropertywith the specifiedname.- Parameters:
name- the name of the property- Returns:
- the property with the specified
name
-
getProperties
Returns the properties.- Returns:
- the properties
-
toString
-
setConfiguration
Configures aPropertyModulewith an XMLNode.- Parameters:
node- the configuration as XML node- See Also:
-
getConfiguration
Returns the configuration of thePropertyModuleas XMLNode.- Parameters:
document- the XML document- Returns:
- the configuration as XML node
- See Also:
-
clone
-
compareTo
- Specified by:
compareToin interfaceComparable<PropertyModule>
-
hashCode
public int hashCode() -
equals
-