public interface TagPluginContext
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 attribute)
Generate codes to evaluate value of a attribute in the custom tag
The codes is a Java expression.
|
void |
generateBody()
Generate codes for the body of the custom tag
|
void |
generateDeclaration(java.lang.String id,
java.lang.String text)
Generate a declaration in the of the generated class.
|
void |
generateImport(java.lang.String s)
Generate an import statement
|
void |
generateJavaSource(java.lang.String s)
Generate Java source codes
|
java.lang.String |
getConstantAttribute(java.lang.String attribute) |
TagPluginContext |
getParentContext()
Get the PluginContext for the parent of this custom tag.
|
java.lang.Object |
getPluginAttribute(java.lang.String attr)
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() |
boolean |
isTagFile()
Is the tag being used inside a tag file?
|
void |
setPluginAttribute(java.lang.String attr,
java.lang.Object value)
Associate the attribute with a value in the current tagplugin context.
|
boolean isScriptless()
boolean isAttributeSpecified(java.lang.String attribute)
attribute
- Name of the attributejava.lang.String getTemporaryVariableName()
void generateImport(java.lang.String s)
s
- Name of the import class, '*' allowed.void generateDeclaration(java.lang.String id, java.lang.String text)
id
- 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.void generateJavaSource(java.lang.String s)
boolean isConstantAttribute(java.lang.String attribute)
java.lang.String getConstantAttribute(java.lang.String attribute)
void generateAttribute(java.lang.String attribute)
attribute
- The specified attributevoid generateBody()
void dontUseTagPlugin()
TagPluginContext getParentContext()
void setPluginAttribute(java.lang.String attr, java.lang.Object value)
java.lang.Object getPluginAttribute(java.lang.String attr)
boolean isTagFile()
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.