|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object xdoclet.template.TemplateTagHandler xdoclet.XDocletTagSupport
Derives from TemplateTagHandler and adds handy support methods for working with Javadoc Doclet classes.
Field Summary | |
static int |
FOR_CLASS
|
static int |
FOR_CONSTRUCTOR
|
static int |
FOR_FIELD
|
static int |
FOR_METHOD
|
protected static String |
PARAMETER_DELIMITER
Default delimiter used inside a xdoclet tag attribute. |
Constructor Summary | |
XDocletTagSupport()
|
Method Summary | |
protected static String |
delimit(String attributeValue,
Properties attributes)
|
protected static String |
expandClassName(String value,
Properties attributes)
|
void |
generate(String template)
|
static xjavadoc.XClass |
getCurrentClass()
Provides the current class in the XDoclet build, or null if there is no current class. |
static xjavadoc.XTag |
getCurrentClassTag()
|
static xjavadoc.XConstructor |
getCurrentConstructor()
Provides the current constructor in the XDoclet build, or null if there is no current constructor. |
static xjavadoc.XField |
getCurrentField()
Provides the current field in the XDoclet build, or null if there is no current field. |
static xjavadoc.XTag |
getCurrentFieldTag()
|
static xjavadoc.XMethod |
getCurrentMethod()
Provides the current method in the XDoclet build, or null if there is no current method. |
static xjavadoc.XTag |
getCurrentMethodTag()
|
static xjavadoc.XPackage |
getCurrentPackage()
Provides the current package in the XDoclet build, or null if there is no current package. |
protected static DocletContext |
getDocletContext()
|
TemplateEngine |
getEngine()
Gets the Engine attribute of the TemplateTagHandler object. |
protected static String |
getExpandedDelimitedTagValue(Properties attributes,
int forType)
The getExpandedDelimitedTagValue method returns a delimited version with class names expanded if
requested of the tag value. |
protected static String |
getTagValue(int forType,
String tagName,
String paramName,
String validValues,
String defaultValue,
boolean superclasses,
boolean mandatory)
Gets the TagValue attribute of the XDocletTagSupport class |
protected static String |
getTagValue(int forType,
xjavadoc.XDoc doc,
String tagName,
String paramName,
String validValues,
String defaultValue,
boolean superclasses,
boolean mandatory)
|
protected static String |
getTagValue(Properties attributes,
int forType)
Return the Value of a tag specified in a Properties object. |
protected boolean |
hasHavingClassTag(xjavadoc.XClass clazz)
Tests whether the passed class has the tag which is specfied in the havingClassTag attribute of the
current subtask. |
protected static boolean |
hasTag(Properties attributes,
int forType)
A utility method used by ifHasClassTag/ifDoesntHaveClassTag and ifHasMethodTag/ifDoesntHaveMethodTag, return true if at least one tag exists with the specified name. |
protected static boolean |
isTagValueEqual(Properties attributes,
int forType)
A utility method used by ifMethodTagValueEquals/ifMethodTagValueNotEquals and ifClassTagValueEquals/ifClassTagValueNotEquals, return true if the value of the tag/XParameter equals with value. |
protected static void |
mandatoryParamNotFound(xjavadoc.XDoc doc,
String paramName,
String tagName)
Throws an XDocletException exception to stop the build process. |
protected void |
mandatoryTemplateTagParamNotFound(String templateTagName,
String paramName)
Throws an XDocletException exception to stop the build process. |
protected String |
modifiers(int forType)
Return the modifiers (static, private, etc.) for the current program element of the specified type. |
static xjavadoc.XClass |
popCurrentClass()
Pop the current class off the top of the class stack. |
static xjavadoc.XClass |
pushCurrentClass(xjavadoc.XClass clazz)
Push the specified class to the top of the current class stack making it effectively the current class. |
static void |
setCurrentClass(xjavadoc.XClass clazz)
Sets current class to clazz by clearing currentClassStack stack and pushing clazz
into top of it. |
static void |
setCurrentClassTag(xjavadoc.XTag currentTag)
Sets the current class tag. |
static void |
setCurrentConstructor(xjavadoc.XConstructor constructor)
Set the current constructor. |
static void |
setCurrentField(xjavadoc.XField field)
Set the current field. |
static void |
setCurrentFieldTag(xjavadoc.XTag currentTag)
Sets the current field tag. |
static void |
setCurrentMethod(xjavadoc.XMethod method)
Set the current method. |
static void |
setCurrentMethodTag(xjavadoc.XTag currentTag)
Sets the current method tag. |
static void |
setCurrentPackage(xjavadoc.XPackage pakkage)
Set the current package. |
Methods inherited from class xdoclet.template.TemplateTagHandler |
getXJavaDoc, setXJavaDoc |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int FOR_CLASS
public static final int FOR_METHOD
public static final int FOR_FIELD
public static final int FOR_CONSTRUCTOR
protected static final String PARAMETER_DELIMITER
Constructor Detail |
public XDocletTagSupport()
Method Detail |
public static xjavadoc.XTag getCurrentMethodTag()
public static xjavadoc.XTag getCurrentClassTag()
public static xjavadoc.XTag getCurrentFieldTag()
public static xjavadoc.XMethod getCurrentMethod()
setCurrentMethod(xjavadoc.XMethod)
public static xjavadoc.XField getCurrentField()
setCurrentField(xjavadoc.XField)
public static xjavadoc.XConstructor getCurrentConstructor()
setCurrentConstructor(xjavadoc.XConstructor)
public static xjavadoc.XClass getCurrentClass()
pushCurrentClass(xjavadoc.XClass)
,
popCurrentClass()
public static xjavadoc.XPackage getCurrentPackage()
public static void setCurrentMethod(xjavadoc.XMethod method)
method
- The method to make the current methodgetCurrentMethod()
public static void setCurrentConstructor(xjavadoc.XConstructor constructor)
constructor
- The constructor to make the current constructorgetCurrentConstructor()
public static void setCurrentClass(xjavadoc.XClass clazz)
clazz
by clearing currentClassStack
stack and pushing clazz
into top of it.
clazz
- The class to make the current classgetCurrentClass()
public static void setCurrentPackage(xjavadoc.XPackage pakkage)
pakkage
- The package to make the current packagegetCurrentPackage()
public static void setCurrentMethodTag(xjavadoc.XTag currentTag)
currentTag
- The tag to make the current method tagpublic static void setCurrentClassTag(xjavadoc.XTag currentTag)
currentTag
- The tag to make the current class tagpublic static void setCurrentFieldTag(xjavadoc.XTag currentTag)
currentTag
- The tag to make the current field tagpublic static void setCurrentField(xjavadoc.XField field)
field
- The field to make the current fieldgetCurrentField()
public static xjavadoc.XClass pushCurrentClass(xjavadoc.XClass clazz)
clazz
- The class to push onto the top of the class stack.
getCurrentClass()
,
popCurrentClass()
public static xjavadoc.XClass popCurrentClass()
getCurrentClass()
,
pushCurrentClass(xjavadoc.XClass)
protected static DocletContext getDocletContext()
protected static String getExpandedDelimitedTagValue(Properties attributes, int forType) throws XDocletException
getExpandedDelimitedTagValue
method returns a delimited version with class names expanded if
requested of the tag value.
attributes
- a Properties
valueforType
- an int
value
String
value
XDocletException
- if an error occursprotected static String getTagValue(Properties attributes, int forType) throws XDocletException
attributes
- The attributes of the template tagforType
- if FOR_CLASS, then a fifth property superclasses is searched, if this is set to
true, then the tag is also searched in all superclasses of current class. If forType is set to FOR_METHOD or
FOR_CONSTRUCTOR or FOR_FIELD, current method or field is searched for the tag.
XDocletException
- Description of Exceptionprotected static String getTagValue(int forType, String tagName, String paramName, String validValues, String defaultValue, boolean superclasses, boolean mandatory) throws XDocletException
forType
- Describe what the parameter doestagName
- Describe what the parameter doesparamName
- Describe what the parameter doesvalidValues
- Describe what the parameter doesdefaultValue
- Describe what the parameter doessuperclasses
- Describe what the parameter doesmandatory
- Describe what the parameter does
XDocletException
- Describe the exceptionprotected static String getTagValue(int forType, xjavadoc.XDoc doc, String tagName, String paramName, String validValues, String defaultValue, boolean superclasses, boolean mandatory) throws XDocletException
doc
- Describe what the parameter doestagName
- Describe what the parameter doesparamName
- Describe what the parameter doesvalidValues
- Describe what the parameter doesdefaultValue
- Describe what the parameter doessuperclasses
- Describe what the parameter doesmandatory
- Describe what the parameter doesforType
-
XDocletException
- Describe the exceptionprotected static boolean isTagValueEqual(Properties attributes, int forType) throws XDocletException
attributes
- The attributes of the template tagforType
- Describe what the parameter does
XDocletException
- Description of Exceptionprotected static String expandClassName(String value, Properties attributes)
protected static void mandatoryParamNotFound(xjavadoc.XDoc doc, String paramName, String tagName) throws XDocletException
paramName
- tag parameter nametagName
- tag namedoc
- member javadoc reference
XDocletException
- Description of Exceptionprotected static boolean hasTag(Properties attributes, int forType) throws XDocletException
attributes
- The attributes of the template tagforType
-
true
if matching tag found
XDocletException
- Description of Exceptionprotected static String delimit(String attributeValue, Properties attributes)
attributeValue
- Describe what the parameter doesattributes
- Describe what the parameter does
public TemplateEngine getEngine()
public void generate(String template) throws XDocletException
template
-
XDocletException
protected String modifiers(int forType) throws XDocletException
forType
- FOR_XXX type constant
XDocletException
- Describe the exceptionprotected void mandatoryTemplateTagParamNotFound(String templateTagName, String paramName) throws XDocletException
templateTagName
- tag nameparamName
- tag parameter name
XDocletException
protected boolean hasHavingClassTag(xjavadoc.XClass clazz)
havingClassTag
attribute of the
current subtask.
clazz
- the Class to check
true
if the current subtask has no havingClassTag
or the passed class has
a tag with the same name as the havingClassTag
attribute of the current subtask, otherwise
false
|
http://xdoclet.sourceforge.net/ | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |