|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectxdoclet.template.TemplateTagHandler
xdoclet.XDocletTagSupport
xdoclet.tagshandler.AbstractProgramElementTagsHandler
xdoclet.tagshandler.MethodTagsHandler
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 | |
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(xjavadoc.XMethod currentMethod)
Merge with modified SubTask.methodNameWithoutPrefix |
static String |
getMethodTypeFor(xjavadoc.XMethod method)
|
static String |
getPropertyNameFor(xjavadoc.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(xjavadoc.XMethod method)
|
static boolean |
hasMethod(xjavadoc.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(xjavadoc.XMethod method)
|
static boolean |
isSetter(String str)
Returns true if the str string starts with "set" prefix. |
static boolean |
isSetterMethod(xjavadoc.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. |
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 |
public MethodTagsHandler()
Method Detail |
public static String getMethodTypeFor(xjavadoc.XMethod method)
public static String getTransformedMethodTypeFor(xjavadoc.XMethod method)
public static String getMethodNameWithoutPrefixFor(xjavadoc.XMethod currentMethod)
currentMethod
- Description of Parameter
public static String getPropertyNameFor(xjavadoc.XMethod method)
method
- Describe what the parameter does
public static boolean isGetter(String str)
str
- Description of Parameter
public static boolean isSetter(String str)
str
-
public static boolean isGetterMethod(xjavadoc.XMethod method)
public static boolean isSetterMethod(xjavadoc.XMethod method)
public static boolean hasMethod(xjavadoc.XClass clazz, String methodName, String[] parameters, boolean setCurrentMethod) throws XDocletException
clazz
- Description of ParametermethodName
- Description of Parameterparameters
- Description of ParametersetCurrentMethod
-
XDocletException
public String getterPrefix() throws XDocletException
XDocletException
- Description of Exceptionpublic String getterMethod() throws XDocletException
XDocletException
- Description of ExceptionmethodNameWithoutPrefix()
,
setterMethod()
,
getterPrefix()
public String setterMethod() throws XDocletException
XDocletException
- Description of ExceptionmethodNameWithoutPrefix()
,
getterMethod()
public void setCurrentMethod(String template, Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of ExceptionifHasMethod(java.lang.String,java.util.Properties)
public String modifiers() throws XDocletException
XDocletException
- Describe the exceptionpublic String methodComment(Properties attributes) throws XDocletException
attributes
- The attributes of the template tag
XDocletException
- Description of ExceptionClassTagsHandler.classComment(java.util.Properties)
public void ifHasMethodComment(String template) throws XDocletException
template
- The body of the block tag
XDocletException
- Description of Exceptionpublic String exceptionList(Properties attributes) throws XDocletException
attributes
- The attributes of the template tag
XDocletException
- Description of Exceptionpublic void ifIsAbstract(String template, Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of ExceptionifIsNotAbstract(java.lang.String,java.util.Properties)
public void ifIsNotAbstract(String template, Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of ExceptionifIsAbstract(java.lang.String,java.util.Properties)
public void ifReturnsVoid(String template, Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of ExceptionifDoesntReturnVoid(java.lang.String,java.util.Properties)
public void ifDoesntReturnVoid(String template, Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of ExceptionifReturnsVoid(java.lang.String,java.util.Properties)
public void forAllClassMethods(String template, Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of Exceptionpublic void forAllMethods(String template, Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of Exceptionpublic void ifDoesntHaveMethodTag(String template, Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of Exceptionpublic void ifHasMethodTag(String template, Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of Exceptionpublic void executeAndRestoreMethod(String template, Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of Exceptionpublic void ifMethodTagValueEquals(String template, Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of Exceptionpublic void ifMethodNameEquals(String template, Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of Exceptionpublic void ifMethodNameNotEquals(String template, Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of Exceptionpublic void ifMethodTagValueNotEquals(String template, Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of Exceptionpublic String methodTagValue(Properties attributes) throws XDocletException
attributes
- The attributes of the template tag
XDocletException
- Description of Exceptionpublic void forAllMethodTags(String template, Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of Exceptionpublic void forAllMethodTagTokens(String template, Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of Exceptionpublic String firstSentenceDescriptionOfCurrentMethod() throws XDocletException
XDocletException
- Description of Exceptionpublic String methodType(Properties attributes) throws XDocletException
attributes
- The attributes of the template tag
XDocletException
- Description of Exceptionpublic String transformedMethodType(Properties attributes) throws XDocletException
attributes
-
XDocletException
- Description of Exceptionpublic void ifIsOfType(String template, Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of Exceptionpublic void ifIsNotOfType(String template, Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of Exceptionpublic boolean ifIsOfTypeImpl(String template, Properties attributes) throws XDocletException
XDocletException
public String methodName(Properties attributes) throws XDocletException
attributes
- The attributes of the template tag
XDocletException
- Description of Exceptionpublic String methodNameWithoutPrefix() throws XDocletException
XDocletException
- Description of Exceptionpublic String currentMethodName() throws XDocletException
XDocletException
- Description of Exceptionpublic String propertyName() throws XDocletException
XDocletException
- Description of Exceptionpublic void ifHasMethod(String template, Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of ExceptionifDoesntHaveMethod(java.lang.String,java.util.Properties)
public void ifDoesntHaveMethod(String template, Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of ExceptionifHasMethod(java.lang.String,java.util.Properties)
public void ifIsGetter(String template, Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of Exceptionpublic void ifIsSetter(String template, Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of Exceptionpublic void ifIsPublic(String template) throws XDocletException
template
- The body of the block tag
XDocletException
- Description of Exceptionpublic void ifThrowsException(String template, Properties attributes) throws XDocletException
exceptions
attribute.
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of ExceptionifDoesntThrowException(java.lang.String,java.util.Properties)
public void ifDoesntThrowException(String template, Properties attributes) throws XDocletException
exceptions
attribute.
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of ExceptionifThrowsException(java.lang.String,java.util.Properties)
|
http://xdoclet.sourceforge.net/ | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |