|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sourceforge.saxadapter.examples.env.EnvironmentImpl
This is a simple implementation of the Environment interface
Fields inherited from interface net.sourceforge.saxadapter.examples.env.Environment |
HOST_IP_PROP, HOST_NAME_PROP |
Constructor Summary | |
(package private) |
EnvironmentImpl()
|
Method Summary | |
java.lang.Boolean |
getBooleanProperty(java.lang.String argName)
Returns the requested property as a Boolean. |
java.util.Date |
getDateProperty(java.lang.String argName)
Returns the requested property as a Date. |
java.lang.Double |
getDoubleProperty(java.lang.String argName)
Returns the requested property as a Double. |
java.lang.Float |
getFloatProperty(java.lang.String argName)
Returns the requested property as a Float. |
java.lang.Integer |
getIntegerProperty(java.lang.String argName)
Returns the requested property as an Integer. |
java.lang.Long |
getLongProperty(java.lang.String argName)
Returns the requested property as a Long. |
java.lang.Object |
getObjectProperty(java.lang.String argName)
Returns a named property as an java.lang.Object type
regardless of the underlying type |
java.lang.String |
getStringProperty(java.lang.String argName)
Returns a String property from the configuration file |
static void |
main(java.lang.String[] args)
This main method takes an argument for path of an XML file in the JVM classpath and prints out the tranformed properties |
void |
printProperties(java.io.OutputStream argOut)
Prints all of the properties to the output stream. |
(package private) void |
setProperty(java.lang.String argName,
java.lang.String argValue,
java.lang.String argType)
Set the property based on type |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
EnvironmentImpl()
Method Detail |
public java.lang.String getStringProperty(java.lang.String argName)
getStringProperty
in interface Environment
argName
- name of the propertypublic java.lang.Object getObjectProperty(java.lang.String argName)
java.lang.Object
type
regardless of the underlying typegetObjectProperty
in interface Environment
argName
- name of the propertypublic java.lang.Long getLongProperty(java.lang.String argName)
getLongProperty
in interface Environment
argName
- name of the propertypublic java.lang.Integer getIntegerProperty(java.lang.String argName)
getIntegerProperty
in interface Environment
argName
- name of the propertypublic java.lang.Float getFloatProperty(java.lang.String argName)
getFloatProperty
in interface Environment
argName
- name of the propertypublic java.lang.Double getDoubleProperty(java.lang.String argName)
getDoubleProperty
in interface Environment
argName
- name of the propertypublic java.lang.Boolean getBooleanProperty(java.lang.String argName)
getBooleanProperty
in interface Environment
argName
- name of the propertypublic java.util.Date getDateProperty(java.lang.String argName)
getDateProperty
in interface Environment
argName
- name of the propertypublic void printProperties(java.io.OutputStream argOut)
printProperties
in interface Environment
argOut
- the output stream on which to print propertiesvoid setProperty(java.lang.String argName, java.lang.String argValue, java.lang.String argType) throws java.lang.Exception
argName
- the name of the propertyargValue
- the String representation of the valueargType
- the Java type of the propertyjava.lang.Exception
- public static void main(java.lang.String[] args)
args
- the first and only argument is the path of an XML file
within the JVM classpath following the DTD
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |