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

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

All Implemented Interfaces:
  Script

    public class ExpressionScript

extends java.lang.Object
implements Script

`ExpressionScript` outputs the value of an expression as text.

Version:
  $Revision: 155420 $
Author:
  James Strachan

Constructor Summary
`ExpressionScript()`
`ExpressionScript(Expression expression)`

Method Summary
`Script` `compile()` Called by the parser to allow a more efficient representation of the script to be used.
`Expression` `getExpression()`
`void` `run(JellyContext context, XMLOutput output)` Evaluates the body of a tag
`void` `setExpression(Expression expression)` Sets the expression evaluated as a String and output by this script
`java.lang.String` `toString()`

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

Constructor Detail

### ExpressionScript

    public ExpressionScript()

### ExpressionScript

    public ExpressionScript(Expression expression)

Method Detail

### toString

    public java.lang.String toString()

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

### getExpression

    public Expression getExpression()

  Returns:
    the expression evaluated as a String and output by this script

### setExpression

    public void setExpression(Expression expression)

  Sets the expression evaluated as a String and 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.