public class XMLParamIf extends java.lang.Object implements XMLParamAware
This class allows you to make conditional statements in xml option files parsed with XMLParamProcessor. This class is XMLParamAware and has its own parsing of content elements. To use this class, do something along the lines of
<if xp:class="com.gripstudios.utils.XMLParamIf" xp:method="getObject"> <if xp:idref="someObject"/> <then>true value</then> <else>false value</else> </if>
If the object returned by if element is non null, a Boolean with value true or a non boolean object, then the object then element evaluates to is returned by getObject. Otherwise the object else element evaluates to is returned. If there is no else element, then it returns null.
Modifier and Type | Field and Description |
---|---|
private java.lang.Object |
object |
Constructor and Description |
---|
XMLParamIf() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getObject() |
void |
xmlParamInitialize(org.w3c.dom.Element element,
XMLParamProcessor processor) |
public void xmlParamInitialize(org.w3c.dom.Element element, XMLParamProcessor processor)
xmlParamInitialize
in interface XMLParamAware
public java.lang.Object getObject()
Copyright 2004-2015 Wandora Team