ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant-myrmidon/tools/xdoclet xdoclet-20020825.jar xjavadoc-20020825.jar xdoclet-20020625.jar xjavadoc-20020625.jar
Date Sun, 25 Aug 2002 04:59:36 GMT
donaldp     2002/08/24 21:59:36

  Modified:    buildtools/src/java/org/apache/myrmidon/build
                        AntTypeTagHandler.java
  Added:       tools/xdoclet xdoclet-20020825.jar xjavadoc-20020825.jar
  Removed:     tools/xdoclet xdoclet-20020625.jar xjavadoc-20020625.jar
  Log:
  Update to the next supposedly stable version of xdoclet.
  
  Revision  Changes    Path
  1.7       +33 -17    jakarta-ant-myrmidon/buildtools/src/java/org/apache/myrmidon/build/AntTypeTagHandler.java
  
  Index: AntTypeTagHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/buildtools/src/java/org/apache/myrmidon/build/AntTypeTagHandler.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AntTypeTagHandler.java	5 Jul 2002 03:21:55 -0000	1.6
  +++ AntTypeTagHandler.java	25 Aug 2002 04:59:36 -0000	1.7
  @@ -11,6 +11,7 @@
   import java.util.Collection;
   import java.util.HashMap;
   import java.util.Map;
  +import java.util.Iterator;
   import xdoclet.XDocletException;
   import xdoclet.XDocletTagSupport;
   import xjavadoc.XClass;
  @@ -58,7 +59,8 @@
                   for( int i = 0; i < methods.length; i++ )
                   {
                       final XMethod method = methods[ i ];
  -                    final XClass childClazz = method.getParameters()[ 0 ].getType();
  +                    final XParameter parameter = getFirstParameter( method );
  +                    final XClass childClazz = parameter.getType();
                       queue.add( childClazz );
                   }
               }
  @@ -67,6 +69,13 @@
           return "";
       }
   
  +    private XParameter getFirstParameter( final XMethod method )
  +    {
  +        final Collection parameters = method.getParameters();
  +        final XParameter parameter = (XParameter)parameters.iterator().next();
  +        return parameter;
  +    }
  +
       /**
        * Iterates over the type tags of the current class.
        */
  @@ -171,11 +180,13 @@
       public void forAllRoleParams( final String template )
           throws XDocletException
       {
  -        final XTag roleTag = getCurrentClass().getDoc().getTag( "ant.role", false );
  -        final String[] params = roleTag.getAttributeValueNames();
  -        for( int i = 0; i < params.length; i++ )
  +        final XTag roleTag =
  +            getCurrentClass().getDoc().getTag( "ant.role", false );
  +        final Collection params = roleTag.getAttributeNames();
  +        final Iterator iterator = params.iterator();
  +        while( iterator.hasNext() )
           {
  -            final String param = params[ i ];
  +            final String param = (String)iterator.next();
               if( param.equals( "name" ) )
               {
                   continue;
  @@ -273,7 +284,8 @@
       public String propertyType() throws XDocletException
       {
           final XMethod method = getCurrentMethod();
  -        return method.getParameters()[ 0 ].getType().getQualifiedName();
  +        final XParameter parameter = getFirstParameter( method );
  +        return parameter.getType().getQualifiedName();
       }
   
       /**
  @@ -299,15 +311,19 @@
               {
                   continue;
               }
  -            final XParameter[] params = method.getParameters();
  -            if( params.length != 1
  -                || params[ 0 ].getDimension() > 0 )
  +            final Collection parameters = method.getParameters();
  +            if( parameters.size() != 1 )
  +            {
  +                continue;
  +            }
  +            final XParameter parameter = getFirstParameter( method );
  +            if( parameter.getDimension() > 0 )
               {
                   continue;
               }
               if( attributeMethods.containsKey( method.getName() ) )
               {
  -                if( params[ 0 ].getType().getQualifiedName().equals( "java.lang.String"
) )
  +                if( parameter.getType().getQualifiedName().equals( "java.lang.String" )
)
                   {
                       // Ignore string methods
                       continue;
  @@ -329,10 +345,10 @@
   
           for( XClass clazz = origClazz; clazz != null; clazz = clazz.getSuperclass() )
           {
  -            final XMethod[] curMethods = clazz.getMethods();
  -            for( int i = 0; i < curMethods.length; i++ )
  +            final Iterator currentMethods = clazz.getMethods().iterator();
  +            while( currentMethods.hasNext() )
               {
  -                final XMethod method = curMethods[ i ];
  +                final XMethod method = (XMethod)currentMethods.next();
                   methods.add( method );
               }
           }
  @@ -353,11 +369,11 @@
        */
       private static XTag[] getTypeTags( final XClass clazz )
       {
  -        final XTag[] tags = clazz.getDoc().getTags();
  +        final Iterator tags = clazz.getDoc().getTags().iterator();
           final ArrayList retval = new ArrayList();
  -        for( int i = 0; i < tags.length; i++ )
  +        while( tags.hasNext() )
           {
  -            final XTag tag = tags[ i ];
  +            final XTag tag = (XTag)tags.next();
               if( tag.getName().equals( "ant.task" ) )
               {
                   retval.add( tag );
  
  
  
  1.1                  jakarta-ant-myrmidon/tools/xdoclet/xdoclet-20020825.jar
  
  	<<Binary file>>
  
  
  1.1                  jakarta-ant-myrmidon/tools/xdoclet/xjavadoc-20020825.jar
  
  	<<Binary file>>
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message