## Method

Implemented in class xdoclet.tagshandler.MethodTagsHandler.

- Block Tags
- Content Tags

### Block Tags:

#### setCurrentMethod (block template)

Evaluate the body if current class has a method with the specified name+parameters. If parameters not specified then any method with the given name and any set of parameters is considered equal to the given method name and so the test result is positive and the body is evaluated. This method change the current method to the one specified.

name | The name of the method we're searching for its existence in current class.
[parameters] | We're searching for a method that has the exact set of parameters specified in parameters param.
[delimiter] | The parameters param is delimited by the string specified in delimiter parameter.

#### exceptionList (block template)

Iterates over all exceptions thrown by the current method and returns a string containing definition of all those exceptions.

[method] | The method name of which exceptions list is extracted. If not specified then current method is used.
[skip] | A comma-separated list of exceptions that should be skipped and not put into the list.
[append] | A comma-separated list of exceptions that should be always appended regardless if current method has that method defined or not.

#### ifIsAbstract (block template)

Evaluate the body block if current method is abstract.

[method] | The method name of which abstractness is evaluated. If not specified then current method is used.

#### ifIsNotAbstract (block template)

Evaluates the body block if current method is not abstract.

[method] | The method name of which exceptions list is extracted. If not specified then current method is used.

#### ifReturnsVoid (block template)

Evaluate the body block if current method returns void.

[method] | The method name whose return type is checked. If not specified then current method is used.

#### ifDoesntReturnVoid (block template)

Evaluates the body block if current method doesn't return void.

[method] | The method name whose return type is checked. If not specified then current method is used.

#### forAllClassMethods (block template)

Loops through all methods for all classes after first sorting all the methods.

[type] | For all classes by the type.
[extent] | 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. Valid Values = {concrete-type,superclass,hierarchy}

#### forAllMethods (block template)

Iterates over all methods of current class and evaluates the body of the tag for each method.

[superclasses] | If true then traverse superclasses also, otherwise look up the tag in current concrete class only. Valid Values = {true,false}
[sort] | If true then sort the methods list. Valid Values = {true,false}

#### ifDoesntHaveMethodTag (block template)

Evaluates the body if current method doesn't have at least one tag with the specified name.

tagName | The tag name.
[paramName] | The parameter name. If not specified, then the raw content of the tag is returned.
[paramNum] | The zero-based parameter number. It's used if the user used the space-separated format for specifying parameters.
[error] | Show this error message if no tag found.

#### ifHasMethodTag (block template)

Evaluates the body if current method has at least one tag with the specified name.

tagName | The tag name.
[paramName] | The parameter name. If not specified, then the raw content of the tag is returned.
[paramNum] | The zero-based parameter number. It's used if the user used the space-separated format for specifying parameters.
[error] | Show this error message if no tag found.

#### executeAndRestoreMethod (block template)

Evaluate the current block, and then restore the current method before continuing.

#### ifMethodTagValueEquals (block template)

Evaluates the body if value for the method tag equals the specified value.

tagName | The tag name.
[paramName] | The parameter name. If not specified, then the raw content of the tag is returned.
[paramNum] | The zero-based parameter number. It's used if the user used the space-separated format for specifying parameters.

#### ifMethodNameEquals (block template)

Evaluates the body if method name equals to the specified value.

name | The method name.

#### ifMethodNameNotEquals (block template)

Evaluates the body if method name equals to the specified value.

name | The method name.

#### ifMethodTagValueNotEquals (block template)

Evaluates the body if value for the method tag not equals the specified value.

tagName | The tag name.
[paramName] | The parameter name. If not specified, then the raw content of the tag is returned.
[paramNum] | The zero-based parameter number. It's used if the user used the space-separated format for specifying parameters.

#### forAllMethodTags (block template)

Iterates over all tags of current method and evaluates the body of the tag for each method.

tagName | The tag name.

#### forAllMethodTagTokens (block template)

Iterates over all tokens in current method tag with the name tagName and evaluates the body for every token.

tagName | The tag name.
[delimiter] | delimiter for the StringTokenizer. consult javadoc for java.util.StringTokenizer default is ','
[skip] | how many tokens to skip on start

#### ifHasMethod (block template)

Evaluate the body if current class has a method with the specified name+parameters. If parameters not specified then any method with the given name and any set of parameters is considered equal to the given method name and so the test result is positive and the body is evaluated. This method does not change the current method to the one specified.

name | The name of the method we're searching for its existence in current class.
[parameters] | We're searching for a method that has the exact set of parameters specified in parameters param.
[delimiter] | The parameters param is delimited by the string specified in delimiter parameter.

#### ifDoesntHaveMethod (block template)

Evaluate the body if current class doesn't have a method with the specified name+parameters. If parameters not specified then any method with the given name and any set of parameters is considered equal to the given method name and so the test result is positive and the body is evaluated.

name | The name of the method we're searching for its existence in current class.
[parameters] | We're searching for a method that has the exact set of parameters specified in parameters param.
[delimiter] | The parameters param is delimited by the string specified in delimiter parameter.

#### ifIsGetter (block template)

Evaluates the body if value for the method tag equals the specified value.

tagName | The tag name.
[paramName] | The parameter name. If not specified, then the raw content of the tag is returned.
[paramNum] | The zero-based parameter number. It's used if the user used the space-separated format for specifying parameters.

#### ifIsSetter (block template)

Evaluates the body if value for the method tag equals the specified value.

tagName | The tag name.
[paramName] | The parameter name. If not specified, then the raw content of the tag is returned.
[paramNum] | The zero-based parameter number. It's used if the user used the space-separated format for specifying parameters.

### Content templates:

#### getterPrefix (content template)

Returns 'get' or 'is' getter prefix part of the current method. Returns empty string if the method doesn't start with either of the two getter prefixes.

#### getterMethod (content template)

Returns the getter method name for the current method by prefixing the method name with the proper getter prefix.

#### setterMethod (content template)

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.

#### methodComment (content template)

The comment for the current method.

[no-comment-signs] | If true then don't decorate the comment with comment signs. Valid Values = {true,false}

#### methodTagValue (content template)

Iterates over all method tags with the specified tagName for the current method probably inside of a forAllMethodTags body.

tagName | The tag name.
[paramName] | The parameter name. If not specified, then the raw content of the tag is returned.
[paramNum] | The zero-based parameter number. It's used if the user used the space-separated format for specifying parameters.
[values] | The valid values for the parameter, comma separated. An error message is printed if the parameter value is not one of the values.
[default] | The default value is returned if parameter not specified by user for the tag.

#### firstSentenceDescriptionOfCurrentMethod (content template)

Return standard javadoc of current method.

#### methodType (content template)

Returns the return type of the current method.

#### methodName (content template)

Returns the name of the current method.

#### methodNameWithoutPrefix (content template)

Returns the name of the current method without the first three characters. Used for cases where the method name without the get/set prefix is needed.

#### propertyName (content template)

Returns the property name extracted from the current method name. Remove any getter/setter prefix from method name and decapitalize it.

#### getClassNameFor (content template)

Returns the not-full-qualified name of the current class without the package name.

#### getFullClassNameFor (content template)

Returns the full-qualified name of the current class with the package name.

#### getFullSuperclassNameFor (content template)

Returns the full-qualified name of the superclass of the current class.

#### setMatchValue (content template)

Sets the vaSoulue of match variable.

value | The new value for matchPattern.

#### matchValue (content template)

Returns the value of match variable. Match variable serves as a variable for templates, you set it somewhere in template and look it up somewhere else in template.

#### currentToken (content template)

Returns current token inside forAllClassTagTokens.

#### skipToken (content template)

Skips current token. Returns empty string.