Sophie

Sophie

distrib > Mandriva > 2010.0 > x86_64 > by-pkgid > 3b947bdd5e0f96306962f8c5b04dc08f > files > 106

xdoclet-manual-1.2.3-8.0.3mdv2010.0.noarch.rpm


<html>
<head>
</head>
<body bgcolor="#ffffff">

<h2>Method</h2>

<p>Implemented in class <a href="../api/xdoclet/tagshandler/MethodTagsHandler.html">xdoclet.tagshandler.MethodTagsHandler</a>.</p>
<ul>
  <li><a href="#block">Block Tags</a>
  <li><a href="#content">Content Tags</a>
</ul>

<h3><a name="block">Block Tags:</a></h3>

<h4><a name="exceptionList">exceptionList</a> (block template)</h4>
<p>Iterates over all exceptions thrown by the current or specified method and returns a string containing definition of all those exceptions.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           [method]
      </i>
    </td>
    <td width="75%" valign="top">
       The method name of which exceptions list is extracted. If not specified then current method is used.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
           [skip]
      </i>
    </td>
    <td width="75%" valign="top">
       A comma-separated list of exceptions that should be skipped and not put into the list.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
           [append]
      </i>
    </td>
    <td width="75%" valign="top">
       A comma-separated list of exceptions that should be always appended regardless if current method has that exception defined or not.<br></br>
    </td>
  </tr>
</table>

<h4><a name="executeAndRestoreMethod">executeAndRestoreMethod</a> (block template)</h4>
<p>Evaluate the current block, and then restore the current method before continuing.</p>

<h4><a name="forAllClassMethods">forAllClassMethods</a> (block template)</h4>
<p>Loops through all methods for all classes after first sorting all the methods.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           [type]
      </i>
    </td>
    <td width="75%" valign="top">
       For all classes by the type.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
           [extent]
      </i>
    </td>
    <td width="75%" valign="top">
       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.<br></br>
        Valid Values = {concrete-type,superclass,hierarchy}
    </td>
  </tr>
</table>

<h4><a name="forAllMethodTagTokens">forAllMethodTagTokens</a> (block template)</h4>
<p>Iterates over all tokens in current method tag with the name tagName and evaluates the body for every token.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           tagName
      </i>
    </td>
    <td width="75%" valign="top">
       The tag name.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
          [delimiter]
      </i>
    </td>
    <td width="75%" valign="top">
       delimiter for the StringTokenizer. consult javadoc for java.util.StringTokenizer default is ','<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
          [skip]
      </i>
    </td>
    <td width="75%" valign="top">
       how many tokens to skip on start<br></br>
    </td>
  </tr>
</table>

<h4><a name="forAllMethodTags">forAllMethodTags</a> (block template)</h4>
<p>Iterates over all tags of current method and evaluates the body of the tag for each method.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           tagName
      </i>
    </td>
    <td width="75%" valign="top">
       The tag name.<br></br>
    </td>
  </tr>
</table>

<h4><a name="forAllMethods">forAllMethods</a> (block template)</h4>
<p>Iterates over all methods of current class and evaluates the body of the tag for each method.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           [superclasses]
      </i>
    </td>
    <td width="75%" valign="top">
       If true then traverse superclasses also, otherwise look up the tag in current concrete class only.<br></br>
        Valid Values = {true,false}
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
           [sort]
      </i>
    </td>
    <td width="75%" valign="top">
       If true then sort the methods list.<br></br>
        Valid Values = {true,false}
    </td>
  </tr>
</table>

<h4><a name="ifDoesntHaveMethod">ifDoesntHaveMethod</a> (block template)</h4>
<p>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.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           name
      </i>
    </td>
    <td width="75%" valign="top">
       The name of the method we're searching for its existence in current class.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
           [parameters]
      </i>
    </td>
    <td width="75%" valign="top">
       We're searching for a method that has the exact set of parameters specified in parameters param.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
           [delimiter]
      </i>
    </td>
    <td width="75%" valign="top">
       The parameters param is delimited by the string specified in delimiter parameter.<br></br>
    </td>
  </tr>
</table>

<h4><a name="ifDoesntHaveMethodTag">ifDoesntHaveMethodTag</a> (block template)</h4>
<p>Evaluates the body if current method doesn't have at least one tag with the specified name.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           tagName
      </i>
    </td>
    <td width="75%" valign="top">
       The tag name.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
          [paramName]
      </i>
    </td>
    <td width="75%" valign="top">
       The parameter name. If not specified, then the raw content of the tag is returned.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
          [paramNum]
      </i>
    </td>
    <td width="75%" valign="top">
       The zero-based parameter number. It's used if the user used the space-separated format for specifying parameters.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
          [error]
      </i>
    </td>
    <td width="75%" valign="top">
       Show this error message if no tag found.<br></br>
    </td>
  </tr>
</table>

<h4><a name="ifDoesntReturnVoid">ifDoesntReturnVoid</a> (block template)</h4>
<p>Evaluates the body block if current method doesn't return void.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           [method]
      </i>
    </td>
    <td width="75%" valign="top">
       The method name whose return type is checked. If not specified then current method is used.<br></br>
    </td>
  </tr>
</table>

<h4><a name="ifDoesntThrowException">ifDoesntThrowException</a> (block template)</h4>
<p>Evaluate the body block if current method doesn't throw the exceptions specified in the <code>exceptions</code> attribute.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           [method]
      </i>
    </td>
    <td width="75%" valign="top">
       The method name whose return type is checked. If not specified then current method is used.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
           exceptions
      </i>
    </td>
    <td width="75%" valign="top">
       The exception name which is checked for<br></br>
    </td>
  </tr>
</table>

<h4><a name="ifHasMethod">ifHasMethod</a> (block template)</h4>
<p>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.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           name
      </i>
    </td>
    <td width="75%" valign="top">
       The name of the method we're searching for its existence in current class.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
           [parameters]
      </i>
    </td>
    <td width="75%" valign="top">
       We're searching for a method that has the exact set of parameters specified in parameters param.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
           [delimiter]
      </i>
    </td>
    <td width="75%" valign="top">
       The parameters param is delimited by the string specified in delimiter parameter.<br></br>
    </td>
  </tr>
</table>

<h4><a name="ifHasMethodComment">ifHasMethodComment</a> (block template)</h4>
<p>Evaluates the body block if current method has a javadoc comment.</p>

<h4><a name="ifHasMethodTag">ifHasMethodTag</a> (block template)</h4>
<p>Evaluates the body if current method has at least one tag with the specified name.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           tagName
      </i>
    </td>
    <td width="75%" valign="top">
       The tag name.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
          [paramName]
      </i>
    </td>
    <td width="75%" valign="top">
       The parameter name. If not specified, then the raw content of the tag is returned.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
          [paramNum]
      </i>
    </td>
    <td width="75%" valign="top">
       The zero-based parameter number. It's used if the user used the space-separated format for specifying parameters.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
          [error]
      </i>
    </td>
    <td width="75%" valign="top">
       Show this error message if no tag found.<br></br>
    </td>
  </tr>
</table>

<h4><a name="ifIsAbstract">ifIsAbstract</a> (block template)</h4>
<p>Evaluate the body block if current method is abstract.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           [method]
      </i>
    </td>
    <td width="75%" valign="top">
       The method name of which abstractness is evaluated. If not specified then current method is used.<br></br>
    </td>
  </tr>
</table>

<h4><a name="ifIsGetter">ifIsGetter</a> (block template)</h4>
<p>Evaluates the body if the specified method (or current method if none is supplied) is a getter method.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           [method]
      </i>
    </td>
    <td width="75%" valign="top">
       The method name.<br></br>
    </td>
  </tr>
</table>

<h4><a name="ifIsNotAbstract">ifIsNotAbstract</a> (block template)</h4>
<p>Evaluates the body block if current method is not abstract.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           [method]
      </i>
    </td>
    <td width="75%" valign="top">
       The method name of which exceptions list is extracted. If not specified then current method is used.<br></br>
    </td>
  </tr>
</table>

<h4><a name="ifIsNotOfType">ifIsNotOfType</a> (block template)</h4>
<p>Evaluates the body if the return type of the current method doesn't equal the specified value.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           type
      </i>
    </td>
    <td width="75%" valign="top">
       The type to compare.<br></br>
    </td>
  </tr>
</table>

<h4><a name="ifIsOfType">ifIsOfType</a> (block template)</h4>
<p>Evaluates the body if the return type of the current method equals the specified value.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           type
      </i>
    </td>
    <td width="75%" valign="top">
       The type to compare.<br></br>
    </td>
  </tr>
</table>

<h4><a name="ifIsPublic">ifIsPublic</a> (block template)</h4>
<p>Evaluates the body if the current method has public visibility.</p>

<h4><a name="ifIsSetter">ifIsSetter</a> (block template)</h4>
<p>Evaluates the body if the specified method (or current method if none is supplied) is a setter method.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           [method]
      </i>
    </td>
    <td width="75%" valign="top">
       The method name.<br></br>
    </td>
  </tr>
</table>

<h4><a name="ifMethodNameEquals">ifMethodNameEquals</a> (block template)</h4>
<p>Evaluates the body if method name equals to the specified value.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           name
      </i>
    </td>
    <td width="75%" valign="top">
       The method name.<br></br>
    </td>
  </tr>
</table>

<h4><a name="ifMethodNameNotEquals">ifMethodNameNotEquals</a> (block template)</h4>
<p>Evaluates the body if method name equals to the specified value.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           name
      </i>
    </td>
    <td width="75%" valign="top">
       The method name.<br></br>
    </td>
  </tr>
</table>

<h4><a name="ifMethodTagValueEquals">ifMethodTagValueEquals</a> (block template)</h4>
<p>Evaluates the body if value for the method tag equals the specified value.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           tagName
      </i>
    </td>
    <td width="75%" valign="top">
       The tag name.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
          [paramName]
      </i>
    </td>
    <td width="75%" valign="top">
       The parameter name. If not specified, then the raw content of the tag is returned.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
          [paramNum]
      </i>
    </td>
    <td width="75%" valign="top">
       The zero-based parameter number. It's used if the user used the space-separated format for specifying parameters.<br></br>
    </td>
  </tr>
</table>

<h4><a name="ifMethodTagValueNotEquals">ifMethodTagValueNotEquals</a> (block template)</h4>
<p>Evaluates the body if value for the method tag not equals the specified value.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           tagName
      </i>
    </td>
    <td width="75%" valign="top">
       The tag name.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
          [paramName]
      </i>
    </td>
    <td width="75%" valign="top">
       The parameter name. If not specified, then the raw content of the tag is returned.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
          [paramNum]
      </i>
    </td>
    <td width="75%" valign="top">
       The zero-based parameter number. It's used if the user used the space-separated format for specifying parameters.<br></br>
    </td>
  </tr>
</table>

<h4><a name="ifReturnsVoid">ifReturnsVoid</a> (block template)</h4>
<p>Evaluate the body block if current method returns void.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           [method]
      </i>
    </td>
    <td width="75%" valign="top">
       The method name whose return type is checked. If not specified then current method is used.<br></br>
    </td>
  </tr>
</table>

<h4><a name="ifThrowsException">ifThrowsException</a> (block template)</h4>
<p>Evaluate the body block if current method throws the exceptions specified in the <code>exceptions</code> attribute.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           [method]
      </i>
    </td>
    <td width="75%" valign="top">
       The method name whose return type is checked. If not specified then current method is used.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
           exceptions
      </i>
    </td>
    <td width="75%" valign="top">
       The exception name which is checked for<br></br>
    </td>
  </tr>
</table>

<h4><a name="setCurrentMethod">setCurrentMethod</a> (block template)</h4>
<p>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.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           name
      </i>
    </td>
    <td width="75%" valign="top">
       The name of the method we're searching for its existence in current class.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
           [parameters]
      </i>
    </td>
    <td width="75%" valign="top">
       We're searching for a method that has the exact set of parameters specified in parameters param.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
           [delimiter]
      </i>
    </td>
    <td width="75%" valign="top">
       The parameters param is delimited by the string specified in delimiter parameter.<br></br>
    </td>
  </tr>
</table>

<h4><a name="setMatchValue">setMatchValue</a> (block template)</h4>
<p>Sets the value of match variable.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           value
      </i>
    </td>
    <td width="75%" valign="top">
       The new value for matchPattern.<br></br>
    </td>
  </tr>
</table>

<h3><a name="content">Content templates:</a></h3>

<h4><a name="currentToken">currentToken</a> (content template)</h4>
<p>Returns current token inside forAllClassTagTokens.</p>

<h4><a name="firstSentenceDescriptionOfCurrentMethod">firstSentenceDescriptionOfCurrentMethod</a> (content template)</h4>
<p>Return standard javadoc of current method.</p>

<h4><a name="getterMethod">getterMethod</a> (content template)</h4>
<p>Returns the getter method name for the current method by prefixing the method name with the proper getter prefix.</p>

<h4><a name="getterPrefix">getterPrefix</a> (content template)</h4>
<p>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.</p>

<h4><a name="matchValue">matchValue</a> (content template)</h4>
<p>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.</p>

<h4><a name="methodComment">methodComment</a> (content template)</h4>
<p>The comment for the current method.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           [no-comment-signs]
      </i>
    </td>
    <td width="75%" valign="top">
       If true then don't decorate the comment with comment signs.<br></br>
        Valid Values = {true,false}
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
           [indent]
      </i>
    </td>
    <td width="75%" valign="top">
       Number of spaces to indent the comment. Default is 0.<br></br>
    </td>
  </tr>
</table>

<h4><a name="methodName">methodName</a> (content template)</h4>
<p>Returns the name of the current method.</p>

<h4><a name="methodNameWithoutPrefix">methodNameWithoutPrefix</a> (content template)</h4>
<p>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.</p>

<h4><a name="methodTagValue">methodTagValue</a> (content template)</h4>
<p>Iterates over all method tags with the specified tagName for the current method probably inside of a forAllMethodTags body.</p>
<table border="1" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td width="25%" valign="top">
      <i>
           tagName
      </i>
    </td>
    <td width="75%" valign="top">
       The tag name.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
          [paramName]
      </i>
    </td>
    <td width="75%" valign="top">
       The parameter name. If not specified, then the raw content of the tag is returned.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
          [paramNum]
      </i>
    </td>
    <td width="75%" valign="top">
       The zero-based parameter number. It's used if the user used the space-separated format for specifying parameters.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
          [values]
      </i>
    </td>
    <td width="75%" valign="top">
       The valid values for the parameter, comma separated. An error message is printed if the parameter value is not one of the values.<br></br>
    </td>
  </tr>
  <tr>
    <td width="25%" valign="top">
      <i>
          [default]
      </i>
    </td>
    <td width="75%" valign="top">
       The default value is returned if parameter not specified by user for the tag.<br></br>
    </td>
  </tr>
</table>

<h4><a name="methodType">methodType</a> (content template)</h4>
<p>Returns the return type of the current method.</p>

<h4><a name="modifiers">modifiers</a> (content template)</h4>
<p>Any modifiers (static, volatile, etc.) for the current method.</p>

<h4><a name="propertyName">propertyName</a> (content template)</h4>
<p>Returns the property name extracted from the current method name. Remove any getter/setter prefix from method name and decapitalize it.</p>

<h4><a name="setterMethod">setterMethod</a> (content template)</h4>
<p>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.</p>

<h4><a name="skipToken">skipToken</a> (content template)</h4>
<p>Skips current token. Returns empty string.</p>

<h4><a name="transformedMethodType">transformedMethodType</a> (content template)</h4>
<p>Returns the transformed return type of the current method.</p>

</body>
</html>