org.wurbelizer
Class SourceSubElement

java.lang.Object
  extended by org.wurbelizer.SourceSubElement
Direct Known Subclasses:
SourceHereSubElement, SourcePropertySubElement, SourceWurbletSubElement

public abstract class SourceSubElement
extends Object

Single- or block-comment-SourceElements may contain SubElements. Currently, the following SubElements are defined:

SubElements may be named or unnamed.


Constructor Summary
SourceSubElement(SourceElement element, String text)
          Creates an unnamed SourceSubElement.
SourceSubElement(SourceElement element, String name, String text)
          Creates a SourceSubElement.
 
Method Summary
 SourceElement getElement()
          Gets the source element.
 String getName()
          Gets the name.
 String getText()
          Gets the contents.
 void setName(String name)
          Sets the name
 String toString()
          String representation of the sub-element
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SourceSubElement

public SourceSubElement(SourceElement element,
                        String name,
                        String text)
Creates a SourceSubElement.

Parameters:
element - the SourceElement containing the sub element
name - the name of the sub element
text - the contents of the sub element

SourceSubElement

public SourceSubElement(SourceElement element,
                        String text)
Creates an unnamed SourceSubElement.

Parameters:
element - the SourceElement containing the sub element
text - the contents of the sub element
Method Detail

getElement

public SourceElement getElement()
Gets the source element.

Returns:
the source element

getName

public String getName()
Gets the name.

Returns:
the name, null if unnamed

setName

public void setName(String name)
Sets the name

Parameters:
name - the name of the sub element

getText

public String getText()
Gets the contents.

Returns:
the text comprising the sub element

toString

public String toString()
String representation of the sub-element

Overrides:
toString in class Object
Returns:
the string value


Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de