org.alltimeflashdreamer.filelister.xml
Class ConfigElement

java.lang.Object
  extended byorg.alltimeflashdreamer.filelister.xml.ConfigElement

public class ConfigElement
extends Object

Title: ConfigElement

Description: This class represents one element node from the config file.

Organization: All Time Flash Dreamer

Version:
0.5.1
Author:
Copyright (c) 2002-2004 by Florian Steinsiepe

Constructor Summary
(package private) ConfigElement(Element element, boolean bLoadDefaults)
          Initializes the class with the given Element node.
 
Method Summary
 Class getClazz()
          Returns the class type of the element.
 String getDefault()
          Returns the default (value) of the element.
 String getDescription()
          Returns the description of the element.
 String getName()
          Returns the name of the element.
 Object getValue()
          Returns the value of the element.
 String getValueString()
          Returns the value of the element as a String .
 void setValue(Object oValue)
          Sets/Updates the value attribute of the element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigElement

ConfigElement(Element element,
              boolean bLoadDefaults)
Initializes the class with the given Element node. This leads to a scanning of the node for its name as well as the "default" and the "value" attribute values. Additionally, the text content of the node is set as the description.

Parameters:
element - the Element representing the node containing all the attributes and the description of this node
bLoadDefaults - whether to load the default values or not
Method Detail

getName

public String getName()
Returns the name of the element.

Returns:
the element name

getValue

public Object getValue()
Returns the value of the element. This is either an Integer, a Boolean or a String.

Returns:
the value object of the element's "value" attribute node

getValueString

public String getValueString()
Returns the value of the element as a String .

Returns:
the value of the element's "value" attribute node, formatted as a String

setValue

public void setValue(Object oValue)
Sets/Updates the value attribute of the element.

Parameters:
oValue - the new value object to be set to the value attribute

getDefault

public String getDefault()
Returns the default (value) of the element.

Returns:
the value of the element's "default" attribute node

getDescription

public String getDescription()
Returns the description of the element.

Returns:
the text value of the element's content

getClazz

public Class getClazz()
Returns the class type of the element. Because Object's getClass method is final and can't be overridden, this method is named getClazz...

Returns:
the value of the element's "class" attribute node, transformed into a class