Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.commons.jelly.impl
Class ScriptBlock  view ScriptBlock download ScriptBlock.java

java.lang.Object
  extended byorg.apache.commons.jelly.impl.ScriptBlock
All Implemented Interfaces:
org.apache.commons.jelly.Script
Direct Known Subclasses:
CompositeTextScriptBlock

public class ScriptBlock
extends java.lang.Object
implements org.apache.commons.jelly.Script

ScriptBlock a block of scripts.

Version:
$Revision: 155420 $

Field Summary
private  java.util.List list
          The list of scripts
 
Constructor Summary
ScriptBlock()
          Create a new instance.
 
Method Summary
 void addScript(org.apache.commons.jelly.Script script)
          Add a new script to the end of this block
 org.apache.commons.jelly.Script compile()
          Called by the parser to allow a more efficient representation of the script to be used.
 java.util.List getScriptList()
          Gets the child scripts that make up this block.
 void removeScript(org.apache.commons.jelly.Script script)
          Removes a script from this block
 void run(org.apache.commons.jelly.JellyContext context, org.apache.commons.jelly.XMLOutput output)
          Evaluates the body of a tag
 java.lang.String toString()
          Convert this Object to a human-readable String.
 void trimWhitespace()
          Trim the body of the script.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

list

private java.util.List list
The list of scripts

Constructor Detail

ScriptBlock

public ScriptBlock()
Create a new instance.

Method Detail

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).


addScript

public void addScript(org.apache.commons.jelly.Script script)
Add a new script to the end of this block


removeScript

public void removeScript(org.apache.commons.jelly.Script script)
Removes a script from this block


getScriptList

public java.util.List getScriptList()
Gets the child scripts that make up this block. This list is live so that it can be modified if requried


compile

public org.apache.commons.jelly.Script compile()
                                        throws org.apache.commons.jelly.JellyException
Description copied from interface: org.apache.commons.jelly.Script
Called by the parser to allow a more efficient representation of the script to be used.

Specified by:
compile in interface org.apache.commons.jelly.Script

run

public void run(org.apache.commons.jelly.JellyContext context,
                org.apache.commons.jelly.XMLOutput output)
         throws org.apache.commons.jelly.JellyTagException
Evaluates the body of a tag

Specified by:
run in interface org.apache.commons.jelly.Script

trimWhitespace

public void trimWhitespace()
Trim the body of the script. In this case, trim all elements, removing any that are empty text.