org.kohsuke.stapler.jelly
Class ReallyStaticTagLibrary

java.lang.Object
  extended by org.apache.commons.jelly.TagLibrary
      extended by org.kohsuke.stapler.jelly.ReallyStaticTagLibrary

public class ReallyStaticTagLibrary
extends org.apache.commons.jelly.TagLibrary

Jelly tag library for static tags.

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.

Since:
1.342
Author:
Kohsuke Kawaguchi

Field Summary
static boolean EMIT_LOCATION
          If true, emit the location information.
static org.apache.commons.jelly.TagLibrary INSTANCE
          Reusable instance.
 
Constructor Summary
ReallyStaticTagLibrary()
           
 
Method Summary
 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)
           
 
Methods inherited from class org.apache.commons.jelly.TagLibrary
createExpression, getExpressionFactory, getTagClasses, registerTag, registerTagFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final org.apache.commons.jelly.TagLibrary INSTANCE
Reusable instance.


EMIT_LOCATION

public static boolean EMIT_LOCATION
If true, emit the location information.

Constructor Detail

ReallyStaticTagLibrary

public ReallyStaticTagLibrary()
Method Detail

createTag

public org.apache.commons.jelly.Tag createTag(java.lang.String name,
                                              org.xml.sax.Attributes attributes)
                                       throws org.apache.commons.jelly.JellyException
IIUC, this method will never be invoked.

Overrides:
createTag in class org.apache.commons.jelly.TagLibrary
Throws:
org.apache.commons.jelly.JellyException

createTagScript

public org.apache.commons.jelly.impl.TagScript createTagScript(java.lang.String tagName,
                                                               org.xml.sax.Attributes atts)
                                                        throws org.apache.commons.jelly.JellyException
Overrides:
createTagScript in class org.apache.commons.jelly.TagLibrary
Throws:
org.apache.commons.jelly.JellyException

createTagScript

public static org.apache.commons.jelly.impl.TagScript createTagScript()
Creates a new instance of TagScript that generates a literal element.



Copyright © 2011. All Rights Reserved.