xdoclet.tagshandler
Class MethodTagsHandler

java.lang.Object
  extended by xdoclet.template.TemplateTagHandler
      extended by xdoclet.XDocletTagSupport
          extended by xdoclet.tagshandler.AbstractProgramElementTagsHandler
              extended by xdoclet.tagshandler.MethodTagsHandler

public class MethodTagsHandler
extends AbstractProgramElementTagsHandler

Version:
$Revision: 1.34 $
Author:
Ara Abrahamian (ara_e@email.com)
xdoclet.taghandler
namespace = "Method"
created
Oct 15, 2001

Field Summary
 
Fields inherited from class xdoclet.tagshandler.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 or specified 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(xjavadoc.XMethod currentMethod)
          Merge with modified SubTask.methodNameWithoutPrefix
static java.lang.String getMethodTypeFor(xjavadoc.XMethod method)
           
static java.lang.String getPropertyNameFor(xjavadoc.XMethod method)
          Gets the PropertyNameFor attribute of the MethodTagsHandler class
 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 java.lang.String getTransformedMethodTypeFor(xjavadoc.XMethod method)
           
static boolean hasMethod(xjavadoc.XClass 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 ifDoesntReturnVoid(java.lang.String template, java.util.Properties attributes)
          Evaluates the body block if current method doesn't return void.
 void ifDoesntThrowException(java.lang.String template, java.util.Properties attributes)
          Evaluate the body block if current method doesn't throw the exceptions specified in the exceptions attribute.
 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 ifHasMethodComment(java.lang.String template)
          Evaluates the body block if current method has a javadoc comment.
 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 ifIsGetter(java.lang.String template, java.util.Properties attributes)
          Evaluates the body if the specified method (or current method if none is supplied) is a getter method.
 void ifIsNotAbstract(java.lang.String template, java.util.Properties attributes)
          Evaluates the body block if current method is not abstract.
 void ifIsNotOfType(java.lang.String template, java.util.Properties attributes)
          Evaluates the body if the return type of the current method doesn't equal the specified value.
 void ifIsOfType(java.lang.String template, java.util.Properties attributes)
          Evaluates the body if the return type of the current method equals the specified value.
 boolean ifIsOfTypeImpl(java.lang.String template, java.util.Properties attributes)
           
 void ifIsPublic(java.lang.String template)
          Evaluates the body if the current method has public visibility.
 void ifIsSetter(java.lang.String template, java.util.Properties attributes)
          Evaluates the body if the specified method (or current method if none is supplied) is a setter method.
 void ifMethodNameEquals(java.lang.String template, java.util.Properties attributes)
          Evaluates the body if method name equals to the specified value.
 void ifMethodNameNotEquals(java.lang.String template, java.util.Properties attributes)
          Evaluates the body if method name equals to the specified value.
 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.
 void ifReturnsVoid(java.lang.String template, java.util.Properties attributes)
          Evaluate the body block if current method returns void.
 void ifThrowsException(java.lang.String template, java.util.Properties attributes)
          Evaluate the body block if current method throws the exceptions specified in the exceptions attribute.
static boolean isGetter(java.lang.String str)
          Returns true if the str string starts with a getter prefix ("get" or "is").
static boolean isGetterMethod(xjavadoc.XMethod method)
           
static boolean isSetter(java.lang.String str)
          Returns true if the str string starts with "set" prefix.
static boolean isSetterMethod(xjavadoc.XMethod method)
           
 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(java.util.Properties attributes)
          Returns the return type of the current method.
 java.lang.String modifiers()
          Any modifiers (static, volatile, etc.) for 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.
 java.lang.String transformedMethodType(java.util.Properties attributes)
          Returns the transformed return type of the current method.
 
Methods inherited from class xdoclet.tagshandler.AbstractProgramElementTagsHandler
checkForWrap, currentToken, exceptionList, firstSentenceDescriptionOfCurrentMember, forAllMembers, forAllMemberTags, forAllMemberTagTokens, getAllClasses, getClassNameFor, getFullClassNameFor, getFullSuperclassNameFor, getIndentChars, getXExecutableMemberForMemberName, getXExecutableMemberForMemberName, hasExecutableMember_OLD, hasExecutableMember, makeCopyOfArray, matchValue, memberComment, setMatchValue, skipToken
 
Methods inherited from class xdoclet.XDocletTagSupport
delimit, expandClassName, generate, getCurrentClass, getCurrentClassTag, getCurrentConstructor, getCurrentField, getCurrentFieldTag, getCurrentMethod, getCurrentMethodTag, getCurrentPackage, getDocletContext, getEngine, getExpandedDelimitedTagValue, getTagValue, getTagValue, getTagValue, hasHavingClassTag, hasTag, isTagValueEqual, mandatoryParamNotFound, mandatoryTemplateTagParamNotFound, modifiers, popCurrentClass, pushCurrentClass, setCurrentClass, setCurrentClassTag, setCurrentConstructor, setCurrentField, setCurrentFieldTag, setCurrentMethod, setCurrentMethodTag, setCurrentPackage
 
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
 

Constructor Detail

MethodTagsHandler

public MethodTagsHandler()
Method Detail

getMethodTypeFor

public static java.lang.String getMethodTypeFor(xjavadoc.XMethod method)

getTransformedMethodTypeFor

public static java.lang.String getTransformedMethodTypeFor(xjavadoc.XMethod method)

getMethodNameWithoutPrefixFor

public static java.lang.String getMethodNameWithoutPrefixFor(xjavadoc.XMethod currentMethod)
Merge with modified SubTask.methodNameWithoutPrefix

Parameters:
currentMethod - Description of Parameter
Returns:
Description of the Returned Value

getPropertyNameFor

public static java.lang.String getPropertyNameFor(xjavadoc.XMethod method)
Gets the PropertyNameFor attribute of the MethodTagsHandler class

Parameters:
method - Describe what the parameter does
Returns:
The PropertyNameFor value

isGetter

public static boolean isGetter(java.lang.String str)
Returns true if the str string starts with a getter prefix ("get" or "is").

Parameters:
str - Description of Parameter
Returns:
The Getter value

isSetter

public static boolean isSetter(java.lang.String str)
Returns true if the str string starts with "set" prefix.

Parameters:
str -
Returns:

isGetterMethod

public static boolean isGetterMethod(xjavadoc.XMethod method)

isSetterMethod

public static boolean isSetterMethod(xjavadoc.XMethod method)

hasMethod

public static boolean hasMethod(xjavadoc.XClass clazz,
                                java.lang.String methodName,
                                java.lang.String[] parameters,
                                boolean setCurrentMethod)
                         throws XDocletException
Returns true if a method with the specified methodName+parameters is found in the class clazz. The parameters array can be empty, if so any method with any set of parameters is considered equal to the method we're searching for. if not empty all parameters of the method must be equal to the ones specified in parameters array to have "method equality".

Parameters:
clazz - Description of Parameter
methodName - Description of Parameter
parameters - Description of Parameter
setCurrentMethod -
Returns:
Description of the Returned Value
Throws:
XDocletException

getterPrefix

public java.lang.String getterPrefix()
                              throws XDocletException
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.

Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception
doc.tag
type = "content"

getterMethod

public java.lang.String getterMethod()
                              throws XDocletException
Returns the getter method name for the current method by prefixing the method name with the proper getter prefix.

Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception
See Also:
methodNameWithoutPrefix(), setterMethod(), getterPrefix()
doc.tag
type = "content"

setterMethod

public java.lang.String setterMethod()
                              throws XDocletException
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.

Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception
See Also:
methodNameWithoutPrefix(), getterMethod()
doc.tag
type = "content"

setCurrentMethod

public void setCurrentMethod(java.lang.String template,
                             java.util.Properties attributes)
                      throws XDocletException
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.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
See Also:
ifHasMethod(java.lang.String,java.util.Properties)
doc.tag
type = "block"
doc.param
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."

modifiers

public java.lang.String modifiers()
                           throws XDocletException
Any modifiers (static, volatile, etc.) for the current method.

Returns:
modifiers
Throws:
XDocletException - Describe the exception
doc.tag
type = "content"

methodComment

public java.lang.String methodComment(java.util.Properties attributes)
                               throws XDocletException
The comment for the current method.

Parameters:
attributes - The attributes of the template tag
Returns:
javadoc comment
Throws:
XDocletException - Description of Exception
See Also:
ClassTagsHandler.classComment(java.util.Properties)
doc.tag
type = "content"
doc.param
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."

ifHasMethodComment

public void ifHasMethodComment(java.lang.String template)
                        throws XDocletException
Evaluates the body block if current method has a javadoc comment.

Parameters:
template - The body of the block tag
Throws:
XDocletException - Description of Exception
doc.tag
type = "block"

exceptionList

public java.lang.String exceptionList(java.util.Properties attributes)
                               throws XDocletException
Iterates over all exceptions thrown by the current or specified method and returns a string containing definition of all those exceptions.

Parameters:
attributes - The attributes of the template tag
Returns:
throws clause for the method
Throws:
XDocletException - Description of Exception
doc.tag
type = "block"
doc.param
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."

ifIsAbstract

public void ifIsAbstract(java.lang.String template,
                         java.util.Properties attributes)
                  throws XDocletException
Evaluate the body block if current method is abstract.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
See Also:
ifIsNotAbstract(java.lang.String,java.util.Properties)
doc.tag
type = "block"
doc.param
name = "method" optional = "true" description = "The method name of which abstractness is * evaluated. If not specified then current method is used."

ifIsNotAbstract

public void ifIsNotAbstract(java.lang.String template,
                            java.util.Properties attributes)
                     throws XDocletException
Evaluates the body block if current method is not abstract.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
See Also:
ifIsAbstract(java.lang.String,java.util.Properties)
doc.tag
type = "block"
doc.param
name = "method" optional = "true" description = "The method name of which exceptions list * is extracted. If not specified then current method is used."

ifReturnsVoid

public void ifReturnsVoid(java.lang.String template,
                          java.util.Properties attributes)
                   throws XDocletException
Evaluate the body block if current method returns void.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
See Also:
ifDoesntReturnVoid(java.lang.String,java.util.Properties)
doc.tag
type = "block"
doc.param
name = "method" optional = "true" description = "The method name whose return type is * checked. If not specified then current method is used."

ifDoesntReturnVoid

public void ifDoesntReturnVoid(java.lang.String template,
                               java.util.Properties attributes)
                        throws XDocletException
Evaluates the body block if current method doesn't return void.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
See Also:
ifReturnsVoid(java.lang.String,java.util.Properties)
doc.tag
type = "block"
doc.param
name = "method" optional = "true" description = "The method name whose return type is * checked. If not specified then current method is used."

forAllClassMethods

public void forAllClassMethods(java.lang.String template,
                               java.util.Properties attributes)
                        throws XDocletException
Loops through all methods for all classes after first sorting all the methods.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
doc.tag
type = "block"
doc.param
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."

forAllMethods

public void forAllMethods(java.lang.String template,
                          java.util.Properties attributes)
                   throws XDocletException
Iterates over all methods of current class and evaluates the body of the tag for each method.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
doc.tag
type = "block"
doc.param
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."

ifDoesntHaveMethodTag

public void ifDoesntHaveMethodTag(java.lang.String template,
                                  java.util.Properties attributes)
                           throws XDocletException
Evaluates the body if current method doesn't have at least one tag with the specified name.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
doc.tag
type = "block"
doc.param
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."

ifHasMethodTag

public void ifHasMethodTag(java.lang.String template,
                           java.util.Properties attributes)
                    throws XDocletException
Evaluates the body if current method has at least one tag with the specified name.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
doc.tag
type = "block"
doc.param
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."

executeAndRestoreMethod

public void executeAndRestoreMethod(java.lang.String template,
                                    java.util.Properties attributes)
                             throws XDocletException
Evaluate the current block, and then restore the current method before continuing.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
doc.tag
type = "block"

ifMethodTagValueEquals

public void ifMethodTagValueEquals(java.lang.String template,
                                   java.util.Properties attributes)
                            throws XDocletException
Evaluates the body if value for the method tag equals the specified value.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
doc.tag
type = "block"
doc.param
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."

ifMethodNameEquals

public void ifMethodNameEquals(java.lang.String template,
                               java.util.Properties attributes)
                        throws XDocletException
Evaluates the body if method name equals to the specified value.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
doc.tag
type = "block"
doc.param
name = "name" optional = "false" description = "The method name."

ifMethodNameNotEquals

public void ifMethodNameNotEquals(java.lang.String template,
                                  java.util.Properties attributes)
                           throws XDocletException
Evaluates the body if method name equals to the specified value.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
doc.tag
type = "block"
doc.param
name = "name" optional = "false" description = "The method name."

ifMethodTagValueNotEquals

public void ifMethodTagValueNotEquals(java.lang.String template,
                                      java.util.Properties attributes)
                               throws XDocletException
Evaluates the body if value for the method tag not equals the specified value.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
doc.tag
type = "block"
doc.param
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."

methodTagValue

public java.lang.String methodTagValue(java.util.Properties attributes)
                                throws XDocletException
Iterates over all method tags with the specified tagName for the current method probably inside of a forAllMethodTags body.

Parameters:
attributes - The attributes of the template tag
Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception
doc.tag
type = "content"
doc.param
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."

forAllMethodTags

public void forAllMethodTags(java.lang.String template,
                             java.util.Properties attributes)
                      throws XDocletException
Iterates over all tags of current method and evaluates the body of the tag for each method.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
doc.tag
type = "block"
doc.param
name = "tagName" optional = "false" description = "The tag name."

forAllMethodTagTokens

public void forAllMethodTagTokens(java.lang.String template,
                                  java.util.Properties attributes)
                           throws XDocletException
Iterates over all tokens in current method tag with the name tagName and evaluates the body for every token.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
doc.tag
type = "block"
doc.param
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"

firstSentenceDescriptionOfCurrentMethod

public java.lang.String firstSentenceDescriptionOfCurrentMethod()
                                                         throws XDocletException
Return standard javadoc of current method.

Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception
doc.tag
type = "content"

methodType

public java.lang.String methodType(java.util.Properties attributes)
                            throws XDocletException
Returns the return type of the current method.

Parameters:
attributes - The attributes of the template tag
Returns:
return type
Throws:
XDocletException - Description of Exception
doc.tag
type = "content"

transformedMethodType

public java.lang.String transformedMethodType(java.util.Properties attributes)
                                       throws XDocletException
Returns the transformed return type of the current method.

Parameters:
attributes -
Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception
doc.tag
type = "content"

ifIsOfType

public void ifIsOfType(java.lang.String template,
                       java.util.Properties attributes)
                throws XDocletException
Evaluates the body if the return type of the current method equals the specified value.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
doc.tag
type = "block"
doc.param
name = "type" optional = "false" description = "The type to compare."

ifIsNotOfType

public void ifIsNotOfType(java.lang.String template,
                          java.util.Properties attributes)
                   throws XDocletException
Evaluates the body if the return type of the current method doesn't equal the specified value.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
doc.tag
type = "block"
doc.param
name = "type" optional = "false" description = "The type to compare."

ifIsOfTypeImpl

public boolean ifIsOfTypeImpl(java.lang.String template,
                              java.util.Properties attributes)
                       throws XDocletException
Throws:
XDocletException

methodName

public java.lang.String methodName(java.util.Properties attributes)
                            throws XDocletException
Returns the name of the current method.

Parameters:
attributes - The attributes of the template tag
Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception
doc.tag
type = "content"

methodNameWithoutPrefix

public java.lang.String methodNameWithoutPrefix()
                                         throws XDocletException
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.

Returns:
Description of the Returned Value
Throws:
XDocletException - Description of Exception
doc.tag
type = "content"

currentMethodName

public java.lang.String currentMethodName()
                                   throws XDocletException
Returns the current method name. Used inside block elements.

Returns:
method name
Throws:
XDocletException - Description of Exception

propertyName

public java.lang.String propertyName()
                              throws XDocletException
Returns the property name extracted from the current method name. Remove any getter/setter prefix from method name and decapitalize it.

Returns:
property name
Throws:
XDocletException - Description of Exception
doc.tag
type = "content"

ifHasMethod

public void ifHasMethod(java.lang.String template,
                        java.util.Properties attributes)
                 throws XDocletException
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.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
See Also:
ifDoesntHaveMethod(java.lang.String,java.util.Properties)
doc.tag
type = "block"
doc.param
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."

ifDoesntHaveMethod

public void ifDoesntHaveMethod(java.lang.String template,
                               java.util.Properties attributes)
                        throws XDocletException
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.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
See Also:
ifHasMethod(java.lang.String,java.util.Properties)
doc.tag
type = "block"
doc.param
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."

ifIsGetter

public void ifIsGetter(java.lang.String template,
                       java.util.Properties attributes)
                throws XDocletException
Evaluates the body if the specified method (or current method if none is supplied) is a getter method.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
doc.tag
type = "block"
doc.param
name = "method" optional = "true" description = "The method name."

ifIsSetter

public void ifIsSetter(java.lang.String template,
                       java.util.Properties attributes)
                throws XDocletException
Evaluates the body if the specified method (or current method if none is supplied) is a setter method.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
doc.tag
type = "block"
doc.param
name = "method" optional = "true" description = "The method name."

ifIsPublic

public void ifIsPublic(java.lang.String template)
                throws XDocletException
Evaluates the body if the current method has public visibility.

Parameters:
template - The body of the block tag
Throws:
XDocletException - Description of Exception
doc.tag
type = "block"

ifThrowsException

public void ifThrowsException(java.lang.String template,
                              java.util.Properties attributes)
                       throws XDocletException
Evaluate the body block if current method throws the exceptions specified in the exceptions attribute.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
See Also:
ifDoesntThrowException(java.lang.String,java.util.Properties)
doc.tag
type = "block"
doc.param
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"

ifDoesntThrowException

public void ifDoesntThrowException(java.lang.String template,
                                   java.util.Properties attributes)
                            throws XDocletException
Evaluate the body block if current method doesn't throw the exceptions specified in the exceptions attribute.

Parameters:
template - The body of the block tag
attributes - The attributes of the template tag
Throws:
XDocletException - Description of Exception
See Also:
ifThrowsException(java.lang.String,java.util.Properties)
doc.tag
type = "block"
doc.param
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"

http://xdoclet.sourceforge.net/