public class Parameter
extends java.lang.Object
implements java.io.Externalizable
name
and value
properties and a bean-like interface to access them. This class is used by
the Configuration
to load arbitrary configuration parameters using
the Apache digester.
Parameter values are always treated as strings and are returned as such
from the Configuration.getParameter(java.lang.String)
method. Callers must further
process/parse this data if different types are required.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
name
Name which uniquely identifies this parameter within configuration
|
private java.lang.String |
value
Value of the parameter
|
Constructor and Description |
---|
Parameter()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
Get name which uniquely identifies this parameter within the
configuration.
|
java.lang.String |
getValue()
Get parameter's value.
|
void |
readExternal(java.io.ObjectInput in)
Replacement for the default object reading method.
|
void |
setName(java.lang.String name)
Set name which uniquely identifies this parameter within the
configuration.
|
void |
setValue(java.lang.String value)
Set this parameter's value.
|
void |
writeExternal(java.io.ObjectOutput out)
Replacement for the default object writing method.
|
private java.lang.String name
private java.lang.String value
public java.lang.String getName()
public void setName(java.lang.String name)
name
- Parameter name.public java.lang.String getValue()
public void setValue(java.lang.String value)
value
- Parameter value as read from configuration document.public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- The output destination to which fields will be saved.java.io.IOException
- In case of I/O errors.public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
in
- Input source from which fields will be restored.java.io.IOException
- In case of I/O errors.java.lang.ClassNotFoundException
- If payload can't be instantiated.