ParameterTagsHandler (XDoclet 1.2.3 API)
Keywords: xdoclet.tagshandler.ParameterTagsHandler class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## xdoclet.tagshandler
Class ParameterTagsHandler

    java.lang.Object
      xdoclet.template.TemplateTagHandler
          xdoclet.XDocletTagSupport
              xdoclet.tagshandler.AbstractProgramElementTagsHandler
                  xdoclet.tagshandler.ParameterTagsHandler

Direct Known Subclasses:
  MockObjectTagsHandler

public class ParameterTagsHandler
extends AbstractProgramElementTagsHandler

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

Field Summary
`protected static xjavadoc.XParameter` | `currentMethodParameter` The current method's current parameter.
`protected static xjavadoc.XTag` | `currentMethodParamTag` The `currentMethodParamTag` holds the current ParamTag corresponding to the current Parameter.
`protected String` | `currentName`

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
`ParameterTagsHandler()`

Method Summary
`String` | `currentName()` return name of parameter currently being iterated - ugly hack...
`void` | `forAllConstructorParams(String template)` Iterates over all parameters of current constructor and evaluates the body of the tag for each method.
`void` | `forAllMethodParams(String template)` Iterates over all parameters of current method and evaluates the body of the tag for each method.
`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.
`static String` | `getMethodParamTypeFor(xjavadoc.XParameter param)`
`void` | `ifHasParams(String template, Properties attributes)` Evaluates the body of the tag if current method/constructor has parameters.
`String` | `methodParamDescription()` The `methodParamDescription` method returns the comment text associated with the ParamTag for the current Parameter
`String` | `methodParamName()` Returns the name of the current method parameter, current method parameter is set inside a forAllMethodParams tag in each iteration.
`String` | `methodParamType(Properties attributes)` Returns the type of the current method parameter, current method parameter is set inside a forAllMethodParams tag in each iteration.
`String` | `parameterList(Properties attributes)` Iterates over all parameters in current method and returns a string containing definition of all those parameters.

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`

Field Detail

### currentMethodParameter

    protected static xjavadoc.XParameter currentMethodParameter

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

  See Also:
    `forAllMethodParams(java.lang.String)`

### currentMethodParamTag

    protected static xjavadoc.XTag currentMethodParamTag

  The `currentMethodParamTag` holds the current ParamTag corresponding to the current Parameter.

  See Also:
    `forAllMethodParams(java.lang.String)`

### currentName

    protected String currentName

Constructor Detail

### ParameterTagsHandler

    public ParameterTagsHandler()

Method Detail

### getMethodParamTypeFor

    public static String getMethodParamTypeFor(xjavadoc.XParameter param)

### methodParamType

    public String methodParamType(Properties attributes)
                           throws XDocletException

  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
  doc.tag
    type="content"

### methodParamDescription

    public String methodParamDescription()
                                  throws XDocletException

  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
  doc.tag
    type="content"

### methodParamName

    public String methodParamName()
                           throws XDocletException

  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
  doc.tag
    type="content"

### forAllMethodParams

    public void forAllMethodParams(String template)
                            throws XDocletException

  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
  doc.tag
    type="block"

### forAllConstructorParams

    public void forAllConstructorParams(String template)
                                 throws XDocletException

  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
  doc.tag
    type="block"

### ifHasParams

    public void ifHasParams(String template,
                            Properties attributes)
                     throws XDocletException

  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
  doc.tag
    type="block"
  doc.param
    name="forConstructor" optional="true" values="true,false" description="If true, then look for parameters of current constructor instead of current method"

### parameterList

    public String parameterList(Properties attributes)
                         throws XDocletException

  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
  doc.tag
    type="block"
  doc.param
    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"

### forAllParameterTypes

    public void forAllParameterTypes(String template,
                                     Properties attributes)
                              throws XDocletException

  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:
    `attributes` - The attributes of the template tag
    `template` - The body of the block tag
  Throws:
    `XDocletException` - Description of Exception
  doc.tag
    type="block"
  doc.param
    name="paramName" optional="false" description="The parameter name that its value is used for extracting parameter types out of it."

### currentName

    public String currentName()

  return name of parameter currently being iterated - ugly hack...

  Returns:
  doc.tag
    type="content"

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| http://xdoclet.sourceforge.net/
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD