xdoclet.tagshandler

Class ParameterTagsHandler

public class ParameterTagsHandler extends AbstractProgramElementTagsHandler

Version: $Revision: 1.19 $

Author: Ara Abrahamian (ara_e@email.com)

UNKNOWN: Oct 15, 2001 namespace = "Parameter"

Field Summary
protected static XParametercurrentMethodParameter
The current method's current parameter. forAllMethodParams sets the value while looping over the parameters of current method.
protected static XTagcurrentMethodParamTag
The currentMethodParamTag holds the current ParamTag corresponding to the current Parameter.
protected StringcurrentName
Method Summary
StringcurrentName()
return name of parameter currently being iterated - ugly hack...
voidforAllConstructorParams(String template)
Iterates over all parameters of current constructor and evaluates the body of the tag for each method.
voidforAllMethodParams(String template)
Iterates over all parameters of current method and evaluates the body of the tag for each method.
voidforAllParameterTypes(String template, Properties attributes)
Gets the value of the parameter specified by paramName of current tag, and assuming the value has the format of a typical method definition extracts of parameter types out of it and evaluates the body for each parameter type. current parameter type can be accessed as <XDtParameter:currentToken/>.
static StringgetMethodParamTypeFor(XParameter param)
voidifHasParams(String template, Properties attributes)
Evaluates the body of the tag if current method/constructor has parameters.
StringmethodParamDescription()
The methodParamDescription method returns the comment text associated with the ParamTag for the current Parameter
StringmethodParamName()
Returns the name of the current method parameter, current method parameter is set inside a forAllMethodParams tag in each iteration.
StringmethodParamType(Properties attributes)
Returns the type of the current method parameter, current method parameter is set inside a forAllMethodParams tag in each iteration.
StringparameterList(Properties attributes)
Iterates over all parameters in current method and returns a string containing definition of all those parameters.

Field Detail

currentMethodParameter

protected static XParameter currentMethodParameter
The current method's current parameter. forAllMethodParams sets the value while looping over the parameters of current method.

See Also: ParameterTagsHandler

currentMethodParamTag

protected static XTag currentMethodParamTag
The currentMethodParamTag holds the current ParamTag corresponding to the current Parameter.

See Also: ParameterTagsHandler

currentName

protected String currentName

Method Detail

currentName

public String currentName()
return name of parameter currently being iterated - ugly hack...

Returns:

UNKNOWN: type = "content"

forAllConstructorParams

public void forAllConstructorParams(String template)
Iterates over all parameters of current constructor and evaluates the body of the tag for each method.

Parameters: template The body of the block tag

Throws: XDocletException Description of Exception

UNKNOWN: type = "block"

forAllMethodParams

public void forAllMethodParams(String template)
Iterates over all parameters of current method and evaluates the body of the tag for each method.

Parameters: template The body of the block tag

Throws: XDocletException Description of Exception

UNKNOWN: type = "block"

forAllParameterTypes

public void forAllParameterTypes(String template, Properties attributes)
Gets the value of the parameter specified by paramName of current tag, and assuming the value has the format of a typical method definition extracts of parameter types out of it and evaluates the body for each parameter type. current parameter type can be accessed as <XDtParameter:currentToken/>. Also gives back parameter name as <XDtParameter:currentName/>

Parameters: template The body of the block tag attributes The attributes of the template tag

Throws: XDocletException Description of Exception

UNKNOWN: type = "block" name = "paramName" optional = "false" description = "The parameter name that its value is * used for extracting parameter types out of it."

getMethodParamTypeFor

public static String getMethodParamTypeFor(XParameter param)

ifHasParams

public void ifHasParams(String template, Properties attributes)
Evaluates the body of the tag if current method/constructor has parameters.

Parameters: template The body of the block tag attributes

Throws: XDocletException Description of Exception

UNKNOWN: type = "block" name = "forConstructor" optional = "true" values = "true,false" description = "If true, then * look for parameters of current constructor instead of current method"

methodParamDescription

public String methodParamDescription()
The methodParamDescription method returns the comment text associated with the ParamTag for the current Parameter

Returns: a String value

Throws: XDocletException if an error occurs

UNKNOWN: type = "content"

methodParamName

public String methodParamName()
Returns the name of the current method parameter, current method parameter is set inside a forAllMethodParams tag in each iteration.

Returns: name of the current method parameter

Throws: XDocletException Description of Exception

UNKNOWN: type = "content"

methodParamType

public String methodParamType(Properties attributes)
Returns the type of the current method parameter, current method parameter is set inside a forAllMethodParams tag in each iteration. Do not forget to add array dimensions if any.

Parameters: attributes

Returns: Description of the Returned Value

Throws: XDocletException Description of Exception

UNKNOWN: type = "content"

parameterList

public String parameterList(Properties attributes)
Iterates over all parameters in current method and returns a string containing definition of all those parameters.

Parameters: attributes The attributes of the template tag

Returns: Description of the Returned Value

Throws: XDocletException Description of Exception

UNKNOWN: type = "block" name = "includeDefinition" optional = "true" values = "true,false" description = "If true * then include the parameter type of parameters in the composed string." name = "forConstructor" optional = "true" values = "true,false" description = "If true, then * look for parameters of current constructor instead of current method"