User: ara_e_w 
  Date: 02/06/09 00:45:51

  Modified:    core/src/xdoclet/tagshandler MethodTagsHandler.java
  Log:
  added ifMethodNameEquals/ifMethodNameNotEquals template tags
  
  Revision  Changes    Path
  1.8       +38 -1     xdoclet/core/src/xdoclet/tagshandler/MethodTagsHandler.java
  
  Index: MethodTagsHandler.java
  ===================================================================
  RCS file: 
/cvsroot/xdoclet/xdoclet/core/src/xdoclet/tagshandler/MethodTagsHandler.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -w -r1.7 -r1.8
  --- MethodTagsHandler.java    9 Jun 2002 07:30:28 -0000       1.7
  +++ MethodTagsHandler.java    9 Jun 2002 07:45:50 -0000       1.8
  @@ -23,7 +23,7 @@
    * @author               Ara Abrahamian ([EMAIL PROTECTED])
    * @created              Oct 15, 2001
    * @xdoclet:taghandler   namespace="Method"
  - * @version              $Revision: 1.7 $
  + * @version              $Revision: 1.8 $
    */
   public class MethodTagsHandler extends AbstractProgramElementTagsHandler
   {
  @@ -489,6 +489,34 @@
       }
   
       /**
  +     * Evaluates the body if method name equals to the specified value.
  +     *
  +     * @param template              The body of the block tag
  +     * @param attributes            The attributes of the template tag
  +     * @exception XDocletException  Description of Exception
  +     * @doc:tag                     type="block"
  +     * @doc:param                   name="name" optional="false" description="The 
method name."
  +     */
  +    public void ifMethodNameEquals(String template, Properties attributes) throws 
XDocletException
  +    {
  +        ifMethodNameEquals_Impl(template, attributes, true);
  +    }
  +
  +    /**
  +     * Evaluates the body if method name equals to the specified value.
  +     *
  +     * @param template              The body of the block tag
  +     * @param attributes            The attributes of the template tag
  +     * @exception XDocletException  Description of Exception
  +     * @doc:tag                     type="block"
  +     * @doc:param                   name="name" optional="false" description="The 
method name."
  +     */
  +    public void ifMethodNameNotEquals(String template, Properties attributes) 
throws XDocletException
  +    {
  +        ifMethodNameEquals_Impl(template, attributes, false);
  +    }
  +
  +    /**
        * Evaluates the body if value for the method tag not equals the specified 
value.
        *
        * @param template              The body of the block tag
  @@ -775,6 +803,15 @@
               }
   
               return method.isAbstract();
  +        }
  +    }
  +
  +    private void ifMethodNameEquals_Impl(String template, Properties attributes, 
boolean condition) throws XDocletException
  +    {
  +        String method_name = attributes.getProperty("name");
  +
  +        if (getCurrentMethod().getName().equals(method_name) == condition) {
  +            generate(template);
           }
       }
   
  
  
  

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to