public class ReallyStaticTagLibrary
extends org.apache.commons.jelly.TagLibrary
Unlike StaticTagScript, this doesn't even try to see if the tag name is available as a dynamic tag.
By not doing so, this implementation achieves a better performance both in speed and memory usage.
Jelly by default uses StaticTagScript instance to represent a tag that's parsed as a static tag,
and for each invocation, this code checks if the tag it represents is now defined as a dynamic tag.
Plus it got the code to cache StaticTag instances per thread, which consumes more space and time.
| Modifier and Type | Field and Description |
|---|---|
static boolean |
EMIT_LOCATION
If true, emit the location information.
|
static org.apache.commons.jelly.TagLibrary |
INSTANCE
Reusable instance.
|
| Constructor and Description |
|---|
ReallyStaticTagLibrary() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.commons.jelly.Tag |
createTag(java.lang.String name,
org.xml.sax.Attributes attributes)
IIUC, this method will never be invoked.
|
static org.apache.commons.jelly.impl.TagScript |
createTagScript()
Creates a new instance of
TagScript that generates a literal element. |
org.apache.commons.jelly.impl.TagScript |
createTagScript(java.lang.String tagName,
org.xml.sax.Attributes atts) |
public static final org.apache.commons.jelly.TagLibrary INSTANCE
public static boolean EMIT_LOCATION
public org.apache.commons.jelly.Tag createTag(java.lang.String name,
org.xml.sax.Attributes attributes)
throws org.apache.commons.jelly.JellyException
createTag in class org.apache.commons.jelly.TagLibraryorg.apache.commons.jelly.JellyExceptionpublic org.apache.commons.jelly.impl.TagScript createTagScript(java.lang.String tagName,
org.xml.sax.Attributes atts)
throws org.apache.commons.jelly.JellyException
createTagScript in class org.apache.commons.jelly.TagLibraryorg.apache.commons.jelly.JellyExceptionpublic static org.apache.commons.jelly.impl.TagScript createTagScript()
TagScript that generates a literal element.Copyright © 2015. All Rights Reserved.