User: rinkrank
  Date: 02/03/01 04:07:37

  Modified:    core/src/xdoclet/util DocletUtil.java
  Log:
  -Refactored common logic in Field/Constructor/MethodTagsHandler up in 
AbstractProgramElementTagsHandler
  (It was pretty bad inheritance-by-copy-paste, and I was guilty of parts of it)
  
  Revision  Changes    Path
  1.13      +16 -31    xdoclet/core/src/xdoclet/util/DocletUtil.java
  
  Index: DocletUtil.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/util/DocletUtil.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -w -r1.12 -r1.13
  --- DocletUtil.java   28 Feb 2002 20:22:48 -0000      1.12
  +++ DocletUtil.java   1 Mar 2002 12:07:37 -0000       1.13
  @@ -15,7 +15,7 @@
   /**
    * @author    Ara Abrahamian ([EMAIL PROTECTED])
    * @created   July 14, 2001
  - * @version   $Revision: 1.12 $
  + * @version   $Revision: 1.13 $
    */
   public final class DocletUtil
   {
  @@ -79,21 +79,6 @@
                return text.replace( ( char ) 13, ' ' );
        }
   
  -     public static Tag[] getTagsByName( FieldDoc field, String tag_name )
  -     {
  -             return getTagsByNameForMemberDoc( field, tag_name );
  -     }
  -
  -     public static Tag[] getTagsByName( MethodDoc method, String tag_name )
  -     {
  -             return getTagsByNameForMemberDoc( method, tag_name );
  -     }
  -
  -     public static Tag[] getTagsByName( ConstructorDoc constructor, String tag_name 
)
  -     {
  -             return getTagsByNameForMemberDoc( constructor, tag_name );
  -     }
  -
        public static Tag[] getTagsByName( ClassDoc clazz, String tag_name )
        {
                return getTagsByName( clazz, tag_name, true );
  @@ -166,6 +151,21 @@
                }
        }
   
  +     public static Tag[] getTagsByName( MemberDoc doc, String tag_name )
  +     {
  +             Tag[] result = doc.tags( tag_name );
  +
  +             //try the namespace.tag format
  +             if( result.length == 0 )
  +             {
  +                     String dotted_format_tag_name = tag_name.replace( ':', '.' );
  +
  +                     result = doc.tags( dotted_format_tag_name );
  +             }
  +
  +             return result;
  +     }
  +
        public static boolean hasTag( Doc doc, String tag )
        {
                return hasTag( doc, tag, true );
  @@ -215,21 +215,6 @@
                        ret[i++] = st.nextToken();
                }
                return ret;
  -     }
  -
  -     private static Tag[] getTagsByNameForMemberDoc( MemberDoc doc, String tag_name 
)
  -     {
  -             Tag[] result = doc.tags( tag_name );
  -
  -             //try the namespace.tag format
  -             if( result.length == 0 )
  -             {
  -                     String dotted_format_tag_name = tag_name.replace( ':', '.' );
  -
  -                     result = doc.tags( dotted_format_tag_name );
  -             }
  -
  -             return result;
        }
   
        private static boolean docHasTag( Doc doc, String tag_name )
  
  
  

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

Reply via email to