User: pathoss 
  Date: 02/05/12 05:02:37

  Modified:    core/src/xdoclet/tagshandler Tag: MODULE_REFACTORING_BRANCH
                        IdTagsHandler.java
  Log:
  Minor refactoring.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.4   +17 -19    xdoclet/core/src/xdoclet/tagshandler/Attic/IdTagsHandler.java
  
  Index: IdTagsHandler.java
  ===================================================================
  RCS file: 
/cvsroot/xdoclet/xdoclet/core/src/xdoclet/tagshandler/Attic/IdTagsHandler.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -w -r1.1.2.3 -r1.1.2.4
  --- IdTagsHandler.java        12 May 2002 11:58:03 -0000      1.1.2.3
  +++ IdTagsHandler.java        12 May 2002 12:02:37 -0000      1.1.2.4
  @@ -19,7 +19,7 @@
   /**
    * @author    Ara Abrahamian ([EMAIL PROTECTED])
    * @created   Oct 15, 2001
  - * @version   $Revision: 1.1.2.3 $
  + * @version   $Revision: 1.1.2.4 $
    */
   public class IdTagsHandler extends XDocletTagSupport
   {
  @@ -38,8 +38,7 @@
        * generating id attribute for XML elements.
        *
        * @param attributes            The attributes of the template tag
  -     * @return                      An id in the form of
  -     *      <prefix>_<num>
  +     * @return                      An id in the form of <prefix>_<num>
        * @exception XDocletException  Description of Exception
        * @doc:tag                     type="content"
        * @doc:param                   name="prefix" optional="false"
  @@ -105,38 +104,38 @@
        */
       public String id(Properties attributes) throws XDocletException
       {
  -        String tag_name = attributes.getProperty("tagName");
  -        String param_names = attributes.getProperty("paramNames");
  +        String tagName = attributes.getProperty("tagName");
  +        String paramNames = attributes.getProperty("paramNames");
   
  -        return getIdForClassBy(getCurrentClass(), tag_name, param_names);
  +        return getIdForClassBy(getCurrentClass(), tagName, paramNames);
       }
   
       /**
  -     * @param param_names           comma-separated of parameter names, first
  +     * @param paramNames           comma-separated of parameter names, first
        *      params are in higher priority.
        * @param clazz
  -     * @param tag_name
  +     * @param tagName
        * @return                      Description of the Returned Value
        * @exception XDocletException
        */
  -    private String getIdForClassBy(XClass clazz, String tag_name, String 
param_names) throws XDocletException
  +    private static String getIdForClassBy(XClass clazz, String tagName, String 
paramNames) throws XDocletException
       {
  -        if (tag_name == null) {
  +        if (tagName == null) {
               System.out.println(Translator.getString("id_param_missing", new 
String[]{"tagName"}));
               return "";
           }
   
  -        if (param_names == null) {
  +        if (paramNames == null) {
               System.out.println(Translator.getString("id_param_missing", new 
String[]{"paramNames"}));
               return "";
           }
   
  -        StringTokenizer st = new StringTokenizer(param_names, ",", false);
  +        StringTokenizer st = new StringTokenizer(paramNames, ",", false);
   
           while (st.hasMoreTokens()) {
  -            String param_value = getTagValue(
  +            String paramValue = getTagValue(
                   FOR_CLASS,
  -                tag_name,
  +                tagName,
                   st.nextToken(),
                   null,
                   null,
  @@ -144,12 +143,11 @@
                   false
                   );
   
  -            if (param_value != null) {
  -                return param_value.replace('/', '_');
  +            if (paramValue != null) {
  +                return paramValue.replace('/', '_');
               }
           }
   
  -        return tag_name;
  +        return tagName;
       }
  -
   }
  
  
  

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to