|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--xdoclet.template.TemplateTagHandler | +--xdoclet.XDocletTagSupport | +--xdoclet.tags.AbstractProgramElementTagsHandler | +--xdoclet.tags.MethodTagsHandler
Fields inherited from class xdoclet.tags.AbstractProgramElementTagsHandler |
currentToken, matchPattern, tagTokenizer |
Fields inherited from class xdoclet.XDocletTagSupport |
FOR_CLASS, FOR_CONSTRUCTOR, FOR_FIELD, FOR_METHOD, PARAMETER_DELIMITER |
Constructor Summary | |
MethodTagsHandler()
|
Method Summary | |
java.lang.String |
currentMethodName()
Returns the current method name. |
java.lang.String |
exceptionList(java.util.Properties attributes)
Iterates over all exceptions thrown by the current method and returns a string containing definition of all those exceptions. |
void |
executeAndRestoreMethod(java.lang.String template,
java.util.Properties attributes)
Evaluate the current block, and then restore the current method before continuing. |
java.lang.String |
firstSentenceDescriptionOfCurrentMethod()
Return standard javadoc of current method. |
void |
forAllClassMethods(java.lang.String template,
java.util.Properties attributes)
Loops through all methods for all classes after first sorting all the methods. |
void |
forAllMethods(java.lang.String template,
java.util.Properties attributes)
Iterates over all methods of current class and evaluates the body of the tag for each method. |
void |
forAllMethodTags(java.lang.String template,
java.util.Properties attributes)
Iterates over all tags of current method and evaluates the body of the tag for each method. |
void |
forAllMethodTagTokens(java.lang.String template,
java.util.Properties attributes)
Iterates over all tokens in current method tag with the name tagName and evaluates the body for every token. |
static java.lang.String |
getMethodNameWithoutPrefixFor(com.sun.javadoc.MethodDoc cur_method)
Merge with modified SubTask.methodNameWithoutPrefix |
static java.lang.String |
getMethodTypeFor(com.sun.javadoc.MethodDoc method)
|
static java.lang.String |
getPropertyNameFor(com.sun.javadoc.MethodDoc method)
|
java.lang.String |
getterMethod()
Returns the getter method name for the current method by prefixing the method name with the proper getter prefix. |
java.lang.String |
getterPrefix()
Returns 'get' or 'is' getter prefix part of the current method. |
static boolean |
hasMethod(com.sun.javadoc.ClassDoc clazz,
java.lang.String methodName,
java.lang.String[] parameters,
boolean setCurrentMethod)
Returns true if a method with the specified methodName+parameters is found in the class clazz. |
void |
ifDoesntHaveMethod(java.lang.String template,
java.util.Properties attributes)
Evaluate the body if current class doesn't have a method with the specified name+parameters. |
void |
ifDoesntHaveMethodTag(java.lang.String template,
java.util.Properties attributes)
Evaluates the body if current method doesn't have at least one tag with the specified name. |
void |
ifHasMethod(java.lang.String template,
java.util.Properties attributes)
Evaluate the body if current class has a method with the specified name+parameters. |
void |
ifHasMethodTag(java.lang.String template,
java.util.Properties attributes)
Evaluates the body if current method has at least one tag with the specified name. |
void |
ifIsAbstract(java.lang.String template,
java.util.Properties attributes)
Evaluate the body block if current method is abstract. |
void |
ifIsNotAbstract(java.lang.String template,
java.util.Properties attributes)
Evaluates the body block if current method is not abstract. |
void |
ifMethodTagValueEquals(java.lang.String template,
java.util.Properties attributes)
Evaluates the body if value for the method tag equals the specified value. |
void |
ifMethodTagValueNotEquals(java.lang.String template,
java.util.Properties attributes)
Evaluates the body if value for the method tag not equals the specified value. |
static boolean |
isGetter(java.lang.String str)
Returns true if the str string starts with a getter prefix ("get" or "is"). |
java.lang.String |
methodComment(java.util.Properties attributes)
The comment for the current method. |
java.lang.String |
methodName(java.util.Properties attributes)
Returns the name of the current method. |
java.lang.String |
methodNameWithoutPrefix()
Returns the name of the current method without the first three characters. |
java.lang.String |
methodTagValue(java.util.Properties attributes)
Iterates over all method tags with the specified tagName for the current method probably inside of a forAllMethodTags body. |
java.lang.String |
methodType()
Returns the return type of the current method. |
java.lang.String |
propertyName()
Returns the property name extracted from the current method name. |
void |
setCurrentMethod(java.lang.String template,
java.util.Properties attributes)
Evaluate the body if current class has a method with the specified name+parameters. |
java.lang.String |
setterMethod()
Returns the setter method name for the current method by prefixing the method name with a 'set' and removing the getter method's 'get' or 'is' prefixes, if any. |
Methods inherited from class xdoclet.template.TemplateTagHandler |
generate, getContext, getEngine, getParser, setContext, setEngine, setParser |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MethodTagsHandler()
Method Detail |
public static java.lang.String getMethodTypeFor(com.sun.javadoc.MethodDoc method) throws XDocletException
public static java.lang.String getMethodNameWithoutPrefixFor(com.sun.javadoc.MethodDoc cur_method)
cur_method
- Description of Parameterpublic static java.lang.String getPropertyNameFor(com.sun.javadoc.MethodDoc method)
public static boolean isGetter(java.lang.String str)
str
- Description of Parameterpublic static boolean hasMethod(com.sun.javadoc.ClassDoc clazz, java.lang.String methodName, java.lang.String[] parameters, boolean setCurrentMethod) throws XDocletException
clazz
- Description of ParametermethodName
- Description of Parameterparameters
- Description of ParametersetCurrentMethod
- XDocletException
- public java.lang.String getterPrefix() throws XDocletException
XDocletException
- Description of Exceptionpublic java.lang.String getterMethod() throws XDocletException
XDocletException
- Description of ExceptionmethodNameWithoutPrefix()
,
setterMethod()
,
getterPrefix()
public java.lang.String setterMethod() throws XDocletException
XDocletException
- Description of ExceptionmethodNameWithoutPrefix()
,
getterMethod()
public void setCurrentMethod(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tagXDocletException
- Description of ExceptionifHasMethod(java.lang.String,java.util.Properties)
public java.lang.String methodComment(java.util.Properties attributes) throws XDocletException
attributes
- The attributes of the template tagXDocletException
- Description of ExceptionClassTagsHandler.classComment(java.util.Properties)
public java.lang.String exceptionList(java.util.Properties attributes) throws XDocletException
attributes
- The attributes of the template tagXDocletException
- Description of Exceptionpublic void ifIsAbstract(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tagXDocletException
- Description of ExceptionifIsNotAbstract(java.lang.String,java.util.Properties)
public void ifIsNotAbstract(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tagXDocletException
- Description of ExceptionifIsAbstract(java.lang.String,java.util.Properties)
public void forAllClassMethods(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tagXDocletException
- Description of Exceptionpublic void forAllMethods(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tagXDocletException
- Description of Exceptionpublic void ifDoesntHaveMethodTag(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tagXDocletException
- Description of Exceptionpublic void ifHasMethodTag(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tagXDocletException
- Description of Exceptionpublic void executeAndRestoreMethod(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tagXDocletException
- Description of Exceptionpublic void ifMethodTagValueEquals(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tagXDocletException
- Description of Exceptionpublic void ifMethodTagValueNotEquals(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tagXDocletException
- Description of Exceptionpublic java.lang.String methodTagValue(java.util.Properties attributes) throws XDocletException
attributes
- The attributes of the template tagXDocletException
- Description of Exceptionpublic void forAllMethodTags(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tagXDocletException
- Description of Exceptionpublic void forAllMethodTagTokens(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tagXDocletException
- Description of Exceptionpublic java.lang.String firstSentenceDescriptionOfCurrentMethod() throws XDocletException
XDocletException
- Description of Exceptionpublic java.lang.String methodType() throws XDocletException
XDocletException
- Description of Exceptionpublic java.lang.String methodName(java.util.Properties attributes) throws XDocletException
attributes
- The attributes of the template tagXDocletException
- Description of Exceptionpublic java.lang.String methodNameWithoutPrefix() throws XDocletException
XDocletException
- Description of Exceptionpublic java.lang.String currentMethodName() throws XDocletException
XDocletException
- Description of Exceptionpublic java.lang.String propertyName() throws XDocletException
XDocletException
- Description of Exceptionpublic void ifHasMethod(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tagXDocletException
- Description of ExceptionifDoesntHaveMethod(java.lang.String,java.util.Properties)
public void ifDoesntHaveMethod(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tagXDocletException
- Description of ExceptionifHasMethod(java.lang.String,java.util.Properties)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |