## org.apache.commons.jelly.impl
Class TextScript

    java.lang.Object
      org.apache.commons.jelly.impl.TextScript

All Implemented Interfaces:
  Script

    public class TextScript

extends java.lang.Object
implements Script

`TextScript` outputs some static text.

Version:
  $Revision: 155420 $
Author:
  James Strachan

Constructor Summary
`TextScript()`
`TextScript(java.lang.String text)`

Method Summary
`Script` `compile()` Called by the parser to allow a more efficient representation of the script to be used.
`java.lang.String` `getText()`
`void` `run(JellyContext context, XMLOutput output)` Evaluates the body of a tag
`void` `setText(java.lang.String text)` Sets the text output by this script
`java.lang.String` `toString()`
`void` `trimEndWhitespace()` Trims whitespace from the end of the text
`void` `trimStartWhitespace()` Trims whitespace from the start of the text
`void` `trimWhitespace()` Trims whitespace from the start and end of the text in this script

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### TextScript

    public TextScript()

### TextScript

    public TextScript(java.lang.String text)

Method Detail

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### trimWhitespace

    public void trimWhitespace()

  Trims whitespace from the start and end of the text in this script

### trimStartWhitespace

    public void trimStartWhitespace()

  Trims whitespace from the start of the text

### trimEndWhitespace

    public void trimEndWhitespace()

  Trims whitespace from the end of the text

### getText

    public java.lang.String getText()

  Returns:
    the text output by this script

### setText

    public void setText(java.lang.String text)

  Sets the text output by this script

### compile

    public Script compile()

  Description copied from interface: `Script`
  Called by the parser to allow a more efficient representation of the script to be used.

  Specified by:
    `compile` in interface `Script`

### run

    public void run(JellyContext context,
                    XMLOutput output)
             throws JellyTagException

  Evaluates the body of a tag

  Specified by:
    `run` in interface `Script`
  Throws:
    `JellyTagException`

Copyright © 2002-2005 Apache Software Foundation. All Rights Reserved.