Class GetStaticTag
java.lang.Object
org.apache.commons.jelly.TagSupport
org.apache.commons.jelly.tags.core.GetStaticTag
- All Implemented Interfaces:
Tag
A tag which can retrieve the value of a static field of a given class.
The following attributes are required:
- var - The variable to which to assign the resulting value.
- field - The name of the static field to retrieve.
- className - The name of the class containing the static field.
<j:getStatic var="closeOperation" className="javax.swing.JFrame"
field="EXIT_ON_CLOSE"/>
- Version:
- $Revision: 155420 $
-
Field Summary
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, parent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidEvaluates this tag after all the tags properties have been initialized.voidsetClassName(String className) Sets the fully qualified name of the class containing the static field.voidSets the name of the field to retrieve.voidSets the name of the variable exported by this tag.Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody
-
Constructor Details
-
GetStaticTag
public GetStaticTag()
-
-
Method Details
-
setVar
Sets the name of the variable exported by this tag.- Parameters:
var- The variable name.
-
setField
Sets the name of the field to retrieve.- Parameters:
field- The field name
-
setClassName
Sets the fully qualified name of the class containing the static field.- Parameters:
className- The name of the class.
-
doTag
Description copied from interface:TagEvaluates this tag after all the tags properties have been initialized.- Throws:
JellyTagException
-