Package org.apache.wiki.parser
Class VariableContent
java.lang.Object
org.jdom2.Content
org.jdom2.Text
org.apache.wiki.parser.VariableContent
- All Implemented Interfaces:
Serializable
,Cloneable
,org.jdom2.NamespaceAware
public class VariableContent extends org.jdom2.Text
Stores the contents of a WikiVariable in a WikiDocument DOM tree.
When the WikiDocument is rendered, if the Context.VAR_WYSIWYG_EDITOR_MODE
is set to Boolean.TRUE
, the
variable declaration is rendered instead of the variable value.
- Since:
- 2.4
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jdom2.Content
org.jdom2.Content.CType
-
Field Summary
Fields inherited from class org.jdom2.Text
value
Fields inherited from class org.jdom2.Content
ctype, parent
-
Constructor Summary
Constructors Constructor Description VariableContent(String varName)
Create a VariableContent for the given variable. -
Method Summary
Methods inherited from class org.jdom2.Text
append, append, clone, detach, getParent, getTextNormalize, getTextTrim, normalizeString, setParent, setText
Methods inherited from class org.jdom2.Content
equals, getCType, getDocument, getNamespacesInherited, getNamespacesInScope, getNamespacesIntroduced, getParentElement, hashCode
-
Constructor Details
-
VariableContent
Create a VariableContent for the given variable.- Parameters:
varName
- The name of the variable.
-
-
Method Details
-
getValue
Evaluates the variable and returns the contents.- Overrides:
getValue
in classorg.jdom2.Text
- Returns:
- The rendered value of the variable.
-
getText
Returns exactly getValue().- Overrides:
getText
in classorg.jdom2.Text
- Returns:
- Whatever getValue() returns.
-
toString
Returns a debug-suitable string.- Overrides:
toString
in classorg.jdom2.Text
- Returns:
- Debug string
-