Class 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 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​(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
      • Methods inherited from class org.jdom2.Content

        equals, getCType, getDocument, getNamespacesInherited, getNamespacesInScope, getNamespacesIntroduced, getParentElement, hashCode
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • 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 class org.jdom2.Text
        Returns:
        The rendered value of the variable.
      • getText

        public java.lang.String getText()
        Returns exactly getValue().
        Overrides:
        getText in class org.jdom2.Text
        Returns:
        Whatever getValue() returns.
      • toString

        public java.lang.String toString()
        Returns a debug-suitable string.
        Overrides:
        toString in class org.jdom2.Text
        Returns:
        Debug string