Package org.apache.commons.jelly.impl
Class ScriptBlock
- java.lang.Object
-
- org.apache.commons.jelly.impl.ScriptBlock
-
- All Implemented Interfaces:
Script
- Direct Known Subclasses:
CompositeTextScriptBlock
public class ScriptBlock extends Object implements Script
ScriptBlock
a block of scripts.- Version:
- $Revision: 155420 $
- Author:
- James Strachan
-
-
Constructor Summary
Constructors Constructor Description ScriptBlock()
Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addScript(Script script)
Add a new script to the end of this blockScript
compile()
Called by the parser to allow a more efficient representation of the script to be used.List
getScriptList()
Gets the child scripts that make up this block.void
removeScript(Script script)
Removes a script from this blockvoid
run(JellyContext context, XMLOutput output)
Evaluates the body of a tagString
toString()
void
trimWhitespace()
Trim the body of the script.
-
-
-
Method Detail
-
toString
public String toString()
- Overrides:
toString
in classObject
- See Also:
Object.toString()
-
addScript
public void addScript(Script script)
Add a new script to the end of this block
-
removeScript
public void removeScript(Script script)
Removes a script from this block
-
getScriptList
public 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 Script compile() throws JellyException
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 interfaceScript
- Throws:
JellyException
-
run
public void run(JellyContext context, XMLOutput output) throws JellyTagException
Evaluates the body of a tag- Specified by:
run
in interfaceScript
- Throws:
JellyTagException
-
trimWhitespace
public void trimWhitespace()
Trim the body of the script. In this case, trim all elements, removing any that are empty text.
-
-