xdoclet.tagshandler
public class MethodTagsHandler extends AbstractProgramElementTagsHandler
Version: $Revision: 1.34 $
UNKNOWN: Oct 15, 2001 namespace = "Method"
Method Summary | |
---|---|
String | currentMethodName()
Returns the current method name. |
String | exceptionList(Properties attributes)
Iterates over all exceptions thrown by the current or specified method and returns a string containing definition
of all those exceptions.
|
void | executeAndRestoreMethod(String template, Properties attributes)
Evaluate the current block, and then restore the current method before continuing.
|
String | firstSentenceDescriptionOfCurrentMethod()
Return standard javadoc of current method.
|
void | forAllClassMethods(String template, Properties attributes)
Loops through all methods for all classes after first sorting all the methods.
|
void | forAllMethods(String template, Properties attributes)
Iterates over all methods of current class and evaluates the body of the tag for each method.
|
void | forAllMethodTags(String template, Properties attributes)
Iterates over all tags of current method and evaluates the body of the tag for each method.
|
void | forAllMethodTagTokens(String template, Properties attributes)
Iterates over all tokens in current method tag with the name tagName and evaluates the body for every token.
|
static String | getMethodNameWithoutPrefixFor(XMethod currentMethod)
Merge with modified SubTask.methodNameWithoutPrefix
|
static String | getMethodTypeFor(XMethod method) |
static String | getPropertyNameFor(XMethod method)
Gets the PropertyNameFor attribute of the MethodTagsHandler class
|
String | getterMethod()
Returns the getter method name for the current method by prefixing the method name with the proper getter prefix.
|
String | getterPrefix()
Returns 'get' or 'is' getter prefix part of the current method. |
static String | getTransformedMethodTypeFor(XMethod method) |
static boolean | hasMethod(XClass clazz, String methodName, String[] parameters, boolean setCurrentMethod)
Returns true if a method with the specified methodName+parameters is found in the class clazz. |
void | ifDoesntHaveMethod(String template, Properties attributes)
Evaluate the body if current class doesn't have a method with the specified name+parameters. |
void | ifDoesntHaveMethodTag(String template, Properties attributes)
Evaluates the body if current method doesn't have at least one tag with the specified name.
|
void | ifDoesntReturnVoid(String template, Properties attributes)
Evaluates the body block if current method doesn't return void.
|
void | ifDoesntThrowException(String template, Properties attributes)
Evaluate the body block if current method doesn't throw the exceptions specified in the exceptions
attribute.
|
void | ifHasMethod(String template, Properties attributes)
Evaluate the body if current class has a method with the specified name+parameters. |
void | ifHasMethodComment(String template)
Evaluates the body block if current method has a javadoc comment.
|
void | ifHasMethodTag(String template, Properties attributes)
Evaluates the body if current method has at least one tag with the specified name.
|
void | ifIsAbstract(String template, Properties attributes)
Evaluate the body block if current method is abstract.
|
void | ifIsGetter(String template, Properties attributes)
Evaluates the body if the specified method (or current method if none is supplied) is a getter method.
|
void | ifIsNotAbstract(String template, Properties attributes)
Evaluates the body block if current method is not abstract.
|
void | ifIsNotOfType(String template, Properties attributes)
Evaluates the body if the return type of the current method doesn't equal the specified value.
|
void | ifIsOfType(String template, Properties attributes)
Evaluates the body if the return type of the current method equals the specified value.
|
boolean | ifIsOfTypeImpl(String template, Properties attributes) |
void | ifIsPublic(String template)
Evaluates the body if the current method has public visibility.
|
void | ifIsSetter(String template, Properties attributes)
Evaluates the body if the specified method (or current method if none is supplied) is a setter method.
|
void | ifMethodNameEquals(String template, Properties attributes)
Evaluates the body if method name equals to the specified value.
|
void | ifMethodNameNotEquals(String template, Properties attributes)
Evaluates the body if method name equals to the specified value.
|
void | ifMethodTagValueEquals(String template, Properties attributes)
Evaluates the body if value for the method tag equals the specified value.
|
void | ifMethodTagValueNotEquals(String template, Properties attributes)
Evaluates the body if value for the method tag not equals the specified value.
|
void | ifReturnsVoid(String template, Properties attributes)
Evaluate the body block if current method returns void.
|
void | ifThrowsException(String template, Properties attributes)
Evaluate the body block if current method throws the exceptions specified in the exceptions
attribute.
|
static boolean | isGetter(String str)
Returns true if the str string starts with a getter prefix ("get" or "is").
|
static boolean | isGetterMethod(XMethod method) |
static boolean | isSetter(String str)
Returns true if the str string starts with "set" prefix.
|
static boolean | isSetterMethod(XMethod method) |
String | methodComment(Properties attributes)
The comment for the current method.
|
String | methodName(Properties attributes)
Returns the name of the current method.
|
String | methodNameWithoutPrefix()
Returns the name of the current method without the first three characters. |
String | methodTagValue(Properties attributes)
Iterates over all method tags with the specified tagName for the current method probably inside of a
forAllMethodTags body.
|
String | methodType(Properties attributes)
Returns the return type of the current method.
|
String | modifiers()
Any modifiers (static, volatile, etc.) for the current method.
|
String | propertyName()
Returns the property name extracted from the current method name. |
void | setCurrentMethod(String template, Properties attributes)
Evaluate the body if current class has a method with the specified name+parameters. |
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.
|
String | transformedMethodType(Properties attributes)
Returns the transformed return type of the current method.
|
Returns: method name
Throws: XDocletException Description of Exception
Parameters: attributes The attributes of the template tag
Returns: throws clause for the method
Throws: XDocletException Description of Exception
UNKNOWN: type = "block" name = "method" optional = "true" description = "The method name of which exceptions list * is extracted. If not specified then current method is used." name = "skip" optional = "true" description = "A comma-separated list of exceptions that * should be skipped and not put into the list." name = "append" optional = "true" description = "A comma-separated list of exceptions that * should be always appended regardless if current method has that exception defined or not."
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
UNKNOWN: type = "block"
Returns: Description of the Returned Value
Throws: XDocletException Description of Exception
UNKNOWN: type = "content"
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
UNKNOWN: type = "block" name = "type" optional = "true" description = "For all classes by the type." name = "extent" optional = "true" values = "concrete-type,superclass,hierarchy" description = "Specifies the extent of the type search. If concrete-type then only check the concrete type, if * superclass then check also superclass, if hierarchy then search the whole hierarchy and find if the class is * of the specified type. Default is hierarchy."
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
UNKNOWN: type = "block" name = "superclasses" optional = "true" values = "true,false" description = "If true then * traverse superclasses also, otherwise look up the tag in current concrete class only." name = "sort" optional = "true" values = "true,false" description = "If true then sort the * methods list."
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
UNKNOWN: type = "block" name = "tagName" optional = "false" description = "The tag name."
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
UNKNOWN: type = "block" name = "tagName" optional = "false" description = "The tag name." name = "delimiter" description = "delimiter for the StringTokenizer. consult javadoc for * java.util.StringTokenizer default is ','" name = "skip" description = "how many tokens to skip on start"
Parameters: currentMethod Description of Parameter
Returns: Description of the Returned Value
Parameters: method Describe what the parameter does
Returns: The PropertyNameFor value
Returns: Description of the Returned Value
Throws: XDocletException Description of Exception
See Also: methodNameWithoutPrefix setterMethod getterPrefix
UNKNOWN: type = "content"
Returns: Description of the Returned Value
Throws: XDocletException Description of Exception
UNKNOWN: type = "content"
Parameters: clazz Description of Parameter methodName Description of Parameter parameters Description of Parameter setCurrentMethod
Returns: Description of the Returned Value
Throws: XDocletException
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
See Also: MethodTagsHandler
UNKNOWN: type = "block" name = "name" optional = "false" description = "The name of the method we're searching for * its existence in current class." name = "parameters" optional = "true" description = "We're searching for a method that has * the exact set of parameters specified in parameters param." name = "delimiter" optional = "true" description = "The parameters param is delimited by * the string specified in delimiter parameter."
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
UNKNOWN: type = "block" name = "tagName" optional = "false" description = "The tag name." name = "paramName" description = "The parameter name. If not specified, then the raw * content of the tag is returned." name = "paramNum" description = "The zero-based parameter number. It's used if the user * used the space-separated format for specifying parameters." name = "error" description = "Show this error message if no tag found."
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
See Also: MethodTagsHandler
UNKNOWN: type = "block" name = "method" optional = "true" description = "The method name whose return type is * checked. If not specified then current method is used."
exceptions
attribute.
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
See Also: MethodTagsHandler
UNKNOWN: type = "block" name = "method" optional = "true" description = "The method name whose return type is * checked. If not specified then current method is used." name = "exceptions" optional = "false" description = "The exception name which is checked * for"
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
See Also: MethodTagsHandler
UNKNOWN: type = "block" name = "name" optional = "false" description = "The name of the method we're searching for * its existence in current class." name = "parameters" optional = "true" description = "We're searching for a method that has * the exact set of parameters specified in parameters param." name = "delimiter" optional = "true" description = "The parameters param is delimited by * the string specified in delimiter parameter."
Parameters: template The body of the block tag
Throws: XDocletException Description of Exception
UNKNOWN: type = "block"
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
UNKNOWN: type = "block" name = "tagName" optional = "false" description = "The tag name." name = "paramName" description = "The parameter name. If not specified, then the raw * content of the tag is returned." name = "paramNum" description = "The zero-based parameter number. It's used if the user * used the space-separated format for specifying parameters." name = "error" description = "Show this error message if no tag found."
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
See Also: MethodTagsHandler
UNKNOWN: type = "block" name = "method" optional = "true" description = "The method name of which abstractness is * evaluated. If not specified then current method is used."
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
UNKNOWN: type = "block" name = "method" optional = "true" description = "The method name."
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
See Also: MethodTagsHandler
UNKNOWN: type = "block" name = "method" optional = "true" description = "The method name of which exceptions list * is extracted. If not specified then current method is used."
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
UNKNOWN: type = "block" name = "type" optional = "false" description = "The type to compare."
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
UNKNOWN: type = "block" name = "type" optional = "false" description = "The type to compare."
Parameters: template The body of the block tag
Throws: XDocletException Description of Exception
UNKNOWN: type = "block"
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
UNKNOWN: type = "block" name = "method" optional = "true" description = "The method name."
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
UNKNOWN: type = "block" name = "name" optional = "false" description = "The method name."
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
UNKNOWN: type = "block" name = "name" optional = "false" description = "The method name."
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
UNKNOWN: type = "block" name = "tagName" optional = "false" description = "The tag name." name = "paramName" description = "The parameter name. If not specified, then the raw * content of the tag is returned." name = "paramNum" description = "The zero-based parameter number. It's used if the user * used the space-separated format for specifying parameters."
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
UNKNOWN: type = "block" name = "tagName" optional = "false" description = "The tag name." name = "paramName" description = "The parameter name. If not specified, then the raw * content of the tag is returned." name = "paramNum" description = "The zero-based parameter number. It's used if the user * used the space-separated format for specifying parameters."
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
See Also: MethodTagsHandler
UNKNOWN: type = "block" name = "method" optional = "true" description = "The method name whose return type is * checked. If not specified then current method is used."
exceptions
attribute.
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
See Also: MethodTagsHandler
UNKNOWN: type = "block" name = "method" optional = "true" description = "The method name whose return type is * checked. If not specified then current method is used." name = "exceptions" optional = "false" description = "The exception name which is checked * for"
Parameters: str Description of Parameter
Returns: The Getter value
Parameters: str
Returns:
Parameters: attributes The attributes of the template tag
Returns: javadoc comment
Throws: XDocletException Description of Exception
See Also: classComment
UNKNOWN: type = "content" name = "no-comment-signs" optional = "true" values = "true,false" description = "If true * then don't decorate the comment with comment signs." name = "indent" optional = "true" description = "Number of spaces to indent the comment. * Default is 0."
Parameters: attributes The attributes of the template tag
Returns: Description of the Returned Value
Throws: XDocletException Description of Exception
UNKNOWN: type = "content"
Returns: Description of the Returned Value
Throws: XDocletException Description of Exception
UNKNOWN: type = "content"
Parameters: attributes The attributes of the template tag
Returns: Description of the Returned Value
Throws: XDocletException Description of Exception
UNKNOWN: type = "content" name = "tagName" optional = "false" description = "The tag name." name = "paramName" description = "The parameter name. If not specified, then the raw * content of the tag is returned." name = "paramNum" description = "The zero-based parameter number. It's used if the user * used the space-separated format for specifying parameters." name = "values" description = "The valid values for the parameter, comma separated. An * error message is printed if the parameter value is not one of the values." name = "default" description = "The default value is returned if parameter not specified * by user for the tag."
Parameters: attributes The attributes of the template tag
Returns: return type
Throws: XDocletException Description of Exception
UNKNOWN: type = "content"
Returns: modifiers
Throws: XDocletException Describe the exception
UNKNOWN: type = "content"
Returns: property name
Throws: XDocletException Description of Exception
UNKNOWN: type = "content"
Parameters: template The body of the block tag attributes The attributes of the template tag
Throws: XDocletException Description of Exception
See Also: MethodTagsHandler
UNKNOWN: type = "block" name = "name" optional = "false" description = "The name of the method we're searching for * its existence in current class." name = "parameters" optional = "true" description = "We're searching for a method that has * the exact set of parameters specified in parameters param." name = "delimiter" optional = "true" description = "The parameters param is delimited by * the string specified in delimiter parameter."
Returns: Description of the Returned Value
Throws: XDocletException Description of Exception
See Also: methodNameWithoutPrefix getterMethod
UNKNOWN: type = "content"
Parameters: attributes
Returns: Description of the Returned Value
Throws: XDocletException Description of Exception
UNKNOWN: type = "content"