|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.jelly.impl.WeakReferenceWrapperScript
Wraps another Script instance in a WeakReference. Used to prevent a Tag class from holding a hard reference to its body script.
If the underlying Script has been GC'd and is no longer available, an exception is thrown on any attempt to use this Script. WARNING: This class is not a permanent part of the API and will be removed or replaced in a future release. Don't extend it or use it unless you absolutely must.
| Field Summary | |
private java.lang.ref.WeakReference |
reference
|
| Constructor Summary | |
WeakReferenceWrapperScript(Script script)
|
|
| Method Summary | |
Script |
compile()
Called by the parser to allow a more efficient representation of the script to be used. |
boolean |
containsScriptType(java.lang.Class clazz)
Determines if this script (the one in the WeakReference) or a child reference contains a Script that's of a particular class. |
void |
run(JellyContext context,
XMLOutput output)
Evaluates the body of a tag |
Script |
script()
Use this method to access the script. |
void |
trimWhitespace()
Trims the white space from the script and its children. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private java.lang.ref.WeakReference reference
| Constructor Detail |
public WeakReferenceWrapperScript(Script script)
| Method Detail |
public Script compile()
throws JellyException
Script
compile in interface ScriptJellyException
public Script script()
throws JellyTagException
JellyException - If the script has been GC'd.
JellyTagException
public void run(JellyContext context,
XMLOutput output)
throws JellyTagException
Script
run in interface ScriptJellyTagException
public void trimWhitespace()
throws JellyTagException
JellyTagException
public boolean containsScriptType(java.lang.Class clazz)
throws JellyTagException
clazz - Find a script that's an instance of this classs.
JellyTagException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||