Package org.apache.wiki.parser
Class VariableContent
- java.lang.Object
-
- org.jdom2.Content
-
- org.jdom2.Text
-
- org.apache.wiki.parser.VariableContent
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.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 toBoolean.TRUE
, the variable declaration is rendered instead of the variable value.- Since:
- 2.4
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description VariableContent(java.lang.String varName)
Create a VariableContent for the given variable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getText()
Returns exactly getValue().java.lang.String
getValue()
Evaluates the variable and returns the contents.java.lang.String
toString()
Returns a debug-suitable string.-
Methods inherited from class org.jdom2.Text
append, append, clone, detach, getParent, getTextNormalize, getTextTrim, normalizeString, setParent, setText
-
-
-
-
Constructor Detail
-
VariableContent
public VariableContent(java.lang.String varName)
Create a VariableContent for the given variable.- Parameters:
varName
- The name of the variable.
-
-
Method Detail
-
getValue
public java.lang.String getValue()
Evaluates the variable and returns the contents.- Overrides:
getValue
in classorg.jdom2.Text
- Returns:
- The rendered value of the variable.
-
getText
public java.lang.String getText()
Returns exactly getValue().- Overrides:
getText
in classorg.jdom2.Text
- Returns:
- Whatever getValue() returns.
-
toString
public java.lang.String toString()
Returns a debug-suitable string.- Overrides:
toString
in classorg.jdom2.Text
- Returns:
- Debug string
-
-