static class TagPluginManager.TagPluginContextImpl extends java.lang.Object implements TagPluginContext
| Modifier and Type | Field and Description |
|---|---|
private Node.Nodes |
curNodes |
private Node.CustomTag |
node |
private PageInfo |
pageInfo |
private java.util.HashMap<java.lang.String,java.lang.Object> |
pluginAttributes |
| Constructor and Description |
|---|
TagPluginContextImpl(Node.CustomTag n,
PageInfo pageInfo) |
| Modifier and Type | Method and Description |
|---|---|
void |
dontUseTagPlugin()
Abandon optimization for this tag handler, and instruct
Jasper to generate the tag handler calls, as usual.
|
void |
generateAttribute(java.lang.String attributeName)
Generate codesto evaluate value of a attribute in the custom tag
The codes is a Java expression.
|
void |
generateBody() |
void |
generateDeclaration(java.lang.String id,
java.lang.String text)
Generate a declaration in the of the generated class.
|
void |
generateImport(java.lang.String imp)
Generate an import statement
|
void |
generateJavaSource(java.lang.String sourceCode)
Generate Java source codes
|
java.lang.String |
getConstantAttribute(java.lang.String attribute) |
private Node.JspAttribute |
getNodeAttribute(java.lang.String attribute) |
TagPluginContext |
getParentContext()
Get the PluginContext for the parent of this custom tag.
|
java.lang.Object |
getPluginAttribute(java.lang.String key)
Get the value of an attribute in the current tagplugin context.
|
java.lang.String |
getTemporaryVariableName() |
boolean |
isAttributeSpecified(java.lang.String attribute) |
boolean |
isConstantAttribute(java.lang.String attribute) |
boolean |
isScriptless() |
void |
setPluginAttribute(java.lang.String key,
java.lang.Object value)
Associate the attribute with a value in the current tagplugin context.
|
private Node.CustomTag node
private Node.Nodes curNodes
private PageInfo pageInfo
private java.util.HashMap<java.lang.String,java.lang.Object> pluginAttributes
TagPluginContextImpl(Node.CustomTag n, PageInfo pageInfo)
public TagPluginContext getParentContext()
TagPluginContextgetParentContext in interface TagPluginContextpublic void setPluginAttribute(java.lang.String key,
java.lang.Object value)
TagPluginContextsetPluginAttribute in interface TagPluginContextpublic java.lang.Object getPluginAttribute(java.lang.String key)
TagPluginContextgetPluginAttribute in interface TagPluginContextpublic boolean isScriptless()
isScriptless in interface TagPluginContextpublic boolean isConstantAttribute(java.lang.String attribute)
isConstantAttribute in interface TagPluginContextpublic java.lang.String getConstantAttribute(java.lang.String attribute)
getConstantAttribute in interface TagPluginContextpublic boolean isAttributeSpecified(java.lang.String attribute)
isAttributeSpecified in interface TagPluginContextattribute - Name of the attributepublic java.lang.String getTemporaryVariableName()
getTemporaryVariableName in interface TagPluginContextpublic void generateImport(java.lang.String imp)
TagPluginContextgenerateImport in interface TagPluginContextimp - Name of the import class, '*' allowed.public void generateDeclaration(java.lang.String id,
java.lang.String text)
TagPluginContextgenerateDeclaration in interface TagPluginContextid - An unique ID identifying the declaration. It is not
part of the declaration, and is used to ensure that the
declaration will only appear once. If this method is
invoked with the same id more than once in the translation
unit, only the first declaration will be taken.text - The text of the declaration.public void generateJavaSource(java.lang.String sourceCode)
TagPluginContextgenerateJavaSource in interface TagPluginContextpublic void generateAttribute(java.lang.String attributeName)
TagPluginContextgenerateAttribute in interface TagPluginContextattributeName - The specified attributepublic void dontUseTagPlugin()
TagPluginContextdontUseTagPlugin in interface TagPluginContextpublic void generateBody()
generateBody in interface TagPluginContextprivate Node.JspAttribute getNodeAttribute(java.lang.String attribute)