User: rinkrank
  Date: 02/03/24 09:44:17

  Modified:    core/src/xdoclet/tags ClassTagsHandler.java
                        ConfigTagsHandler.java ConstructorTagsHandler.java
                        FieldTagsHandler.java IdTagsHandler.java
                        MergeTagsHandler.java MethodTagsHandler.java
                        PackageTagsHandler.java ParameterTagsHandler.java
                        PropertyTagsHandler.java TranslatorTagsHandler.java
                        TypeTagsHandler.java XmlTagsHandler.java
                        AbstractProgramElementTagsHandler.java
  Log:
  Merging changes from XJAVADOC_REFACTORING branch back to main branch
  
  Revision  Changes    Path
  1.24      +35 -35    xdoclet/core/src/xdoclet/tags/ClassTagsHandler.java
  
  Index: ClassTagsHandler.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/tags/ClassTagsHandler.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -w -r1.23 -r1.24
  --- ClassTagsHandler.java     5 Mar 2002 17:51:33 -0000       1.23
  +++ ClassTagsHandler.java     24 Mar 2002 17:44:16 -0000      1.24
  @@ -1,6 +1,6 @@
   package xdoclet.tags;
   
  -import com.sun.javadoc.*;
  +import xjavadoc.*;
   
   import org.apache.log4j.Category;
   
  @@ -9,7 +9,7 @@
   import xdoclet.XDocletException;
   import xdoclet.template.PrettyPrintWriter;
   import xdoclet.template.TemplateException;
  -import xdoclet.util.DocletUtil;
  +
   import xdoclet.util.Log;
   import xdoclet.util.Translator;
   import xdoclet.util.TypeConversionUtil;
  @@ -20,7 +20,7 @@
   /**
    * @author    Ara Abrahamian ([EMAIL PROTECTED])
    * @created   Oct 14, 2001
  - * @version   $Revision: 1.23 $
  + * @version   $Revision: 1.24 $
    */
   public class ClassTagsHandler extends AbstractProgramElementTagsHandler
   {
  @@ -37,8 +37,10 @@
         * @param clazz  Description of Parameter
         * @return       Description of the Returned Value
         * @doc:tag      type="content"
  +      * @deprecated use XClass.name()
  +      * @todo duplicate in AbstractProgramElementTagsHandler
         */
  -     public static String getClassNameFor( ClassDoc clazz )
  +     public static String getClassNameFor( XClass clazz )
        {
                return clazz.name();
        }
  @@ -49,8 +51,9 @@
         * @param clazz  Description of Parameter
         * @return       Description of the Returned Value
         * @doc:tag      type="content"
  +      * @deprecated use XClass.qualifiedName()
         */
  -     public static String getFullClassNameFor( ClassDoc clazz )
  +     public static String getFullClassNameFor( XClass clazz )
        {
                if( clazz.containingClass() != null )
                        return clazz.containingClass().qualifiedName();
  @@ -157,13 +160,13 @@
         * @doc:tag                     type="block"
         * @doc:param                   name="value" optional="false"
         *      values="return-type,whatever class name" description="If return-type
  -      *      specified then push current method return type, else find the ClassDoc
  +      *      specified then push current method return type, else find the XClass
         *      for the class name and push it."
         */
        public void pushClass( String template, Properties attributes ) throws 
XDocletException
        {
                String value = attributes.getProperty( "value", null );
  -             ClassDoc cur_class = null;
  +             XClass cur_class = null;
   
                if( value == null )
                {
  @@ -178,13 +181,13 @@
                        }
                }
   
  -             cur_class = getContext().getRoot().classNamed( value );
  +             cur_class = XJavaDoc.getInstance().getXClass( value );
   
                if( cur_class == null )
                        throw new XDocletException( Translator.getString( 
"javadoc_couldnt_load_class",
                                new String[]{value} ) );
   
  -             MethodDoc old_method = getCurrentMethod();
  +             XMethod old_method = getCurrentMethod();
   
                pushCurrentClass( cur_class );
                setCurrentMethod( null );
  @@ -232,8 +235,8 @@
                        cat.debug( "extent=" + extent );
                }
   
  -             ClassDoc[] classes = getAllClasses();
  -             ClassDoc cur_class = null;
  +             XClass[] classes = getAllClasses();
  +             XClass cur_class = null;
   
                for( int i = 0; i < classes.length; i++ )
                {
  @@ -281,7 +284,8 @@
         */
        public String symbolicClassName() throws XDocletException
        {
  -             return getCurrentClass().typeName();
  +             // (Aslak) not sure if this is correct
  +             return getCurrentClass().name();
        }
   
        /**
  @@ -307,7 +311,7 @@
         */
        public void ifDoesntHaveClassTag( String template, Properties attributes ) 
throws XDocletException
        {
  -             if( !ifHasTag_Impl( template, attributes, FOR_CLASS ) )
  +             if( !hasTag( attributes, FOR_CLASS ) )
                        generate( template );
                else
                {
  @@ -341,7 +345,7 @@
         */
        public void ifHasClassTag( String template, Properties attributes ) throws 
XDocletException
        {
  -             if( ifHasTag_Impl( template, attributes, FOR_CLASS ) )
  +             if( hasTag( attributes, FOR_CLASS ) )
                        generate( template );
                else
                {
  @@ -396,7 +400,7 @@
         */
        public void ifClassTagValueEquals( String template, Properties attributes ) 
throws XDocletException
        {
  -             if( ifTagValueEquals_Impl( template, attributes, FOR_CLASS ) )
  +             if( isTagValueEqual( attributes, FOR_CLASS ) )
                        generate( template );
        }
   
  @@ -420,7 +424,7 @@
         */
        public void ifClassTagValueNotEquals( String template, Properties attributes ) 
throws XDocletException
        {
  -             if( !ifTagValueEquals_Impl( template, attributes, FOR_CLASS ) )
  +             if( !isTagValueEqual( attributes, FOR_CLASS ) )
                        generate( template );
        }
   
  @@ -497,7 +501,7 @@
        public void forAllClassTags( String template, Properties attributes ) throws 
XDocletException
        {
                boolean superclasses = TypeConversionUtil.stringToBoolean( 
attributes.getProperty( "superclasses" ), true );
  -             Tag[] tags = DocletUtil.getTagsByName( getCurrentClass(), 
attributes.getProperty( "tagName" ), superclasses );
  +             XTag[] tags = getCurrentClass().doc().tags( attributes.getProperty( 
"tagName" ), superclasses );
                Set done = new HashSet();
   
                matchPattern = null;
  @@ -508,7 +512,7 @@
                {
                        if( tagKey != null )
                        {
  -                             String key = getParameterValue( DocletUtil.getText( 
tags[i] ), tagKey, -1 );
  +                             String key = tags[i].attributeValue( tagKey );
   
                                if( !done.add( key ) )
                                {
  @@ -616,7 +620,7 @@
                boolean no_comment_signs = TypeConversionUtil.stringToBoolean( 
attributes.getProperty( "no-comment-signs" ), false );
   
                if( no_comment_signs )
  -                     return getCurrentClass().commentText();
  +                     return getCurrentClass().doc().commentText();
   
                char[] spaces = getIndentChars( attributes );
                StringBuffer result = new StringBuffer();
  @@ -647,12 +651,12 @@
                boolean no_comment_signs = TypeConversionUtil.stringToBoolean( 
attributes.getProperty( "no-comment-signs" ), false );
   
                if( no_comment_signs )
  -                     return getCurrentClass().commentText();
  +                     return getCurrentClass().doc().commentText();
   
                char[] spaces = getIndentChars( attributes );
                StringBuffer result = new StringBuffer();
   
  -             result.append( spaces ).append( " * " ).append( 
getCurrentClass().commentText() ).append( PrettyPrintWriter.LINE_SEPARATOR );
  +             result.append( spaces ).append( " * " ).append( 
getCurrentClass().doc().commentText() ).append( PrettyPrintWriter.LINE_SEPARATOR );
   
                return result.toString();
        }
  @@ -673,7 +677,7 @@
        public String classCommentTags( Properties attributes ) throws XDocletException
        {
                char[] spaces = getIndentChars( attributes );
  -             Tag[] class_tags = getCurrentClass().tags();
  +             XTag[] class_tags = getCurrentClass().doc().tags();
                StringBuffer result = new StringBuffer();
   
                for( int i = 0; i < class_tags.length; i++ )
  @@ -683,15 +687,15 @@
   
                        if( class_tag.lastIndexOf( ':' ) == -1 && 
class_tag.lastIndexOf( '.' ) == -1 )
                        {
  -                             result.append( spaces ).append( " * " ).append( 
class_tags[i].name() ).append( ' ' );
  +                             result.append( spaces ).append( " * @" ).append( 
class_tags[i].name() ).append( ' ' );
   
                                if( getDocletContext().getExcludedTags().indexOf( 
class_tags[i].name() ) == -1 )
  -                                     result.append( class_tags[i].text() ).append( 
PrettyPrintWriter.LINE_SEPARATOR );
  +                                     result.append( class_tags[i].value() ).append( 
PrettyPrintWriter.LINE_SEPARATOR );
                                else
  -                                     result.append( "XDOCLET " ).append( 
DocletTask.XDOCLET_VERSION );
  +                                     result.append( "XDOCLET " ).append( 
DocletTask.XDOCLET_VERSION ).append( PrettyPrintWriter.LINE_SEPARATOR );
   
  -                             if( i < class_tags.length - 1 )
  -                                     result.append( 
PrettyPrintWriter.LINE_SEPARATOR );
  +//                           if( i < class_tags.length - 1 )
  +//                                   result.append( 
PrettyPrintWriter.LINE_SEPARATOR );
                        }
                }
   
  @@ -721,13 +725,9 @@
         */
        public String firstSentenceDescription( Properties attributes ) throws 
XDocletException
        {
  -             Tag[] tags = getCurrentClass().firstSentenceTags();
  -             String desc = null;
  -
  -             if( tags != null && tags.length > 0 )
  -                     desc = tags[0].text();
  +             String desc = getCurrentClass().doc().firstSentence();
   
  -             if( desc == null || desc.length() == 0 )
  +             if( desc == null )
                {
                        String no_description_if_lacking_str = attributes.getProperty( 
"no-description-if-lacking" );
                        boolean no_description_if_lacking = 
TypeConversionUtil.stringToBoolean( no_description_if_lacking_str, true );
  @@ -761,8 +761,8 @@
                String currentPackage = PackageTagsHandler.getPackageNameFor( 
currentClass );
   
                StringBuffer st = new StringBuffer();
  -             PackageDoc[] packages = getCurrentClass().importedPackages();
  -             ClassDoc[] classes = getCurrentClass().importedClasses();
  +             XPackage[] packages = getCurrentClass().importedPackages();
  +             XClass[] classes = getCurrentClass().importedClasses();
   
                for( int i = 0; i < packages.length; i++ )
                {
  
  
  
  1.9       +14 -14    xdoclet/core/src/xdoclet/tags/ConfigTagsHandler.java
  
  Index: ConfigTagsHandler.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/tags/ConfigTagsHandler.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -w -r1.8 -r1.9
  --- ConfigTagsHandler.java    6 Feb 2002 00:22:53 -0000       1.8
  +++ ConfigTagsHandler.java    24 Mar 2002 17:44:16 -0000      1.9
  @@ -10,7 +10,7 @@
   import java.lang.reflect.InvocationTargetException;
   import java.lang.reflect.Method;
   import java.util.Properties;
  -import java.util.Vector;
  +import java.util.ArrayList;
   import java.util.Collection;
   import java.util.Arrays;
   import java.beans.Introspector;
  @@ -18,14 +18,14 @@
   /**
    * @author    Ara Abrahamian ([EMAIL PROTECTED])
    * @created   Oct 15, 2001
  - * @version   $Revision: 1.8 $
  + * @version   $Revision: 1.9 $
    */
   public class ConfigTagsHandler extends XDocletTagSupport
   {
        /**
         * The current config parameter name. forAllConfigParameters sets the value
         * while looping over values of the config parameter. Note that this is only
  -      * used for config parameters of type java.util.Vector. Other tags working with
  +      * used for config parameters of type java.util.ArrayList. Other tags working 
with
         * config parameters use current config parameter name to lookup the value of
         * that parameter. For each config parameter there exists a corresponding
         * getter method in the subtask, so all public getter methods can be used as
  @@ -112,14 +112,14 @@
                                        //ok we have activesubtask.element value, use 
reflection to get the param inside the element
                                        if( config_val != null )
                                        {
  -                                             // we're in a forAllConfigParams loop 
for a Vector-based config parameter
  +                                             // we're in a forAllConfigParams loop 
for a ArrayList-based config parameter
                                                if( currentConfigParamIndex != -1 )
                                                {
                                                        if( cat.isDebugEnabled() )
  -                                                             cat.debug( "In a 
forAllConfigParams loop for a Vector-based config parameter." );
  +                                                             cat.debug( "In a 
forAllConfigParams loop for a ArrayList-based config parameter." );
   
  -                                                     // param_value = element at 
currentConfigParamIndex index of the Vector
  -                                                     config_val = ( ( 
java.util.Vector ) config_val ).elementAt( currentConfigParamIndex );
  +                                                     // param_value = element at 
currentConfigParamIndex index of the ArrayList
  +                                                     config_val = ( ( 
java.util.ArrayList ) config_val ).get( currentConfigParamIndex );
                                                }
   
                                                Method getter_method = 
ConfigParamIntrospector.findGetterMethod( config_val, paramname );
  @@ -151,14 +151,14 @@
   
                                if( config_val != null )
                                {
  -                                     // we're in a forAllConfigParams loop for a 
Vector-based config parameter
  +                                     // we're in a forAllConfigParams loop for a 
ArrayList-based config parameter
                                        if( currentConfigParamIndex != -1 )
                                        {
                                                if( cat.isDebugEnabled() )
  -                                                     cat.debug( "In a 
forAllConfigParams loop for a Vector-based config parameter." );
  +                                                     cat.debug( "In a 
forAllConfigParams loop for a ArrayList-based config parameter." );
   
  -                                             // param_value = element at 
currentConfigParamIndex index of the Vector
  -                                             config_val = ( ( java.util.Vector ) 
config_val ).elementAt( currentConfigParamIndex );
  +                                             // param_value = element at 
currentConfigParamIndex index of the ArrayList
  +                                             config_val = ( ( java.util.ArrayList ) 
config_val ).get( currentConfigParamIndex );
                                        }
   
                                        Method getter_method = 
ConfigParamIntrospector.findGetterMethod( config_val, paramname );
  @@ -270,8 +270,8 @@
   
        /**
         * Evaluate the body for all configuration parameters with the name paramName.
  -      * It's basically used for java.util.Vector-based parameter types, and the body
  -      * is evaluated for all items of the Vector.
  +      * It's basically used for java.util.ArrayList-based parameter types, and the 
body
  +      * is evaluated for all items of the ArrayList.
         *
         * @param template              The body of the block tag
         * @param attributes            The attributes of the template tag
  @@ -284,7 +284,7 @@
        public void forAllConfigParameters( String template, Properties attributes ) 
throws XDocletException
        {
                String param_name = attributes.getProperty( "paramName" );
  -             Vector configParams = ( java.util.Vector ) getConfigParameter( 
param_name );
  +             ArrayList configParams = ( java.util.ArrayList ) getConfigParameter( 
param_name );
   
                for( int i = 0; i < configParams.size(); i++ )
                {
  
  
  
  1.5       +16 -15    xdoclet/core/src/xdoclet/tags/ConstructorTagsHandler.java
  
  Index: ConstructorTagsHandler.java
  ===================================================================
  RCS file: 
/cvsroot/xdoclet/xdoclet/core/src/xdoclet/tags/ConstructorTagsHandler.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -r1.4 -r1.5
  --- ConstructorTagsHandler.java       1 Mar 2002 12:07:37 -0000       1.4
  +++ ConstructorTagsHandler.java       24 Mar 2002 17:44:16 -0000      1.5
  @@ -1,12 +1,13 @@
   package xdoclet.tags;
   
  -import com.sun.javadoc.*;
  +import xjavadoc.*;
   
   import xdoclet.XDocletException;
   import xdoclet.ejb.DataObjectSubTask;
   import xdoclet.template.PrettyPrintWriter;
  -import xdoclet.util.DocletUtil;
  +
   import xdoclet.util.Log;
  +import xdoclet.util.DocletUtil;
   import xdoclet.util.Translator;
   import xdoclet.util.TypeConversionUtil;
   
  @@ -18,7 +19,7 @@
   /**
    * @author    Jerome Bernard ([EMAIL PROTECTED])
    * @created   Jan 18, 2002
  - * @version   $Revision: 1.4 $
  + * @version   $Revision: 1.5 $
    */
   public class ConstructorTagsHandler extends AbstractProgramElementTagsHandler
   {
  @@ -36,7 +37,7 @@
         * @return                       Description of the Returned Value
         * @exception XDocletException
         */
  -     protected static boolean hasConstructor( ClassDoc clazz, String 
constructorName, String[] parameters, boolean setCurrentConstructor )
  +     private static boolean hasConstructor( XClass clazz, String constructorName, 
String[] parameters, boolean setCurrentConstructor )
                 throws XDocletException
        {
                return hasExecutableMember( clazz, constructorName, parameters, 
setCurrentConstructor, FOR_CONSTRUCTOR );
  @@ -81,7 +82,7 @@
                        parameters = DocletUtil.tokenizeDelimitedToArray( 
parametersStr, delimiter );
                }
   
  -             ConstructorDoc oldConstructor = getCurrentConstructor();
  +             XConstructor oldConstructor = getCurrentConstructor();
   
                if( hasConstructor( getCurrentClass(), constructorName, parameters, 
true ) )
                {
  @@ -153,14 +154,14 @@
                String type_name = attributes.getProperty( "type" );
                int extent = TypeTagsHandler.extractExtentType( 
attributes.getProperty( "extent" ) );
   
  -             ClassDoc[] classes = getAllClasses();
  +             XClass[] classes = getAllClasses();
                SortedSet constructors = new TreeSet();
   
                for( int i = 0; i < classes.length; i++ )
                {
                        if( type_name == null || TypeTagsHandler.isOfType( classes[i], 
type_name, extent ) )
                        {
  -                             ConstructorDoc[] classConstructors = 
classes[i].constructors();
  +                             XConstructor[] classConstructors = 
classes[i].constructors();
   
                                for( int j = 0; j < classConstructors.length; j++ )
                                        constructors.add( classConstructors[j] );
  @@ -172,7 +173,7 @@
   
                while( constructorsIterator.hasNext() )
                {
  -                     ConstructorDoc current = ( ConstructorDoc ) 
constructorsIterator.next();
  +                     XConstructor current = ( XConstructor ) 
constructorsIterator.next();
   
                        setCurrentClass( current.containingClass() );
                        setCurrentConstructor( current );
  @@ -219,7 +220,7 @@
         */
        public void ifDoesntHaveConstructorTag( String template, Properties attributes 
) throws XDocletException
        {
  -             if( !ifHasTag_Impl( template, attributes, FOR_CONSTRUCTOR ) )
  +             if( !hasTag( attributes, FOR_CONSTRUCTOR ) )
                        generate( template );
                else
                {
  @@ -250,7 +251,7 @@
         */
        public void ifHasConstructorTag( String template, Properties attributes ) 
throws XDocletException
        {
  -             if( ifHasTag_Impl( template, attributes, FOR_CONSTRUCTOR ) )
  +             if( hasTag( attributes, FOR_CONSTRUCTOR ) )
                        generate( template );
                else
                {
  @@ -272,7 +273,7 @@
         */
        public void executeAndRestoreConstructor( String template, Properties 
attributes ) throws XDocletException
        {
  -             ConstructorDoc constructor = getCurrentConstructor();
  +             XConstructor constructor = getCurrentConstructor();
   
                generate( template );
                setCurrentConstructor( constructor );
  @@ -296,7 +297,7 @@
         */
        public void ifConstructorTagValueEquals( String template, Properties 
attributes ) throws XDocletException
        {
  -             if( ifTagValueEquals_Impl( template, attributes, FOR_CONSTRUCTOR ) )
  +             if( isTagValueEqual( attributes, FOR_CONSTRUCTOR ) )
                        generate( template );
        }
   
  @@ -318,7 +319,7 @@
         */
        public void ifConstructorTagValueNotEquals( String template, Properties 
attributes ) throws XDocletException
        {
  -             if( !ifTagValueEquals_Impl( template, attributes, FOR_CONSTRUCTOR ) )
  +             if( !isTagValueEqual( attributes, FOR_CONSTRUCTOR ) )
                        generate( template );
        }
   
  @@ -394,7 +395,7 @@
         */
        public String firstSentenceDescriptionOfCurrentConstructor() throws 
XDocletException
        {
  -             return getCurrentConstructor().firstSentenceTags().length > 0 ? 
getCurrentConstructor().firstSentenceTags()[0].text().trim() : "";
  +             return 
firstSentenceDescriptionOfCurrentMember(getCurrentConstructor());
        }
   
        /**
  @@ -500,7 +501,7 @@
         * @exception XDocletException  Description of Exception
         * @see                         
#ifHasConstructor(java.lang.String,java.util.Properties)
         * @see                         
#ifDoesntHaveConstructor(java.lang.String,java.util.Properties)
  -      * @see                         
#hasConstructor(com.sun.javadoc.ClassDoc,java.lang.String,java.lang.String[],boolean)
  +      * @see                         
#hasConstructor(xjavadoc.XClass,java.lang.String,java.lang.String[],boolean)
         */
        private void ifHasConstructor_Impl( String template, Properties attributes, 
boolean has_constructor ) throws XDocletException
        {
  
  
  
  1.9       +19 -6     xdoclet/core/src/xdoclet/tags/FieldTagsHandler.java
  
  Index: FieldTagsHandler.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/tags/FieldTagsHandler.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -w -r1.8 -r1.9
  --- FieldTagsHandler.java     1 Mar 2002 12:07:37 -0000       1.8
  +++ FieldTagsHandler.java     24 Mar 2002 17:44:17 -0000      1.9
  @@ -1,10 +1,10 @@
   package xdoclet.tags;
   
  -import com.sun.javadoc.*;
  +import xjavadoc.*;
   
   import xdoclet.XDocletException;
   import xdoclet.template.PrettyPrintWriter;
  -import xdoclet.util.DocletUtil;
  +
   import xdoclet.util.Log;
   import xdoclet.util.Translator;
   import xdoclet.util.TypeConversionUtil;
  @@ -17,14 +17,14 @@
   /**
    * @author    <a href="mailto:[EMAIL PROTECTED]";>Aslak Helles�y</a>
    * @created   13. januar 2002
  - * @version   $Revision: 1.8 $
  + * @version   $Revision: 1.9 $
    */
   public class FieldTagsHandler extends AbstractProgramElementTagsHandler
   {
   
  -     public static String getFieldTypeFor( FieldDoc field ) throws XDocletException
  +     public static String getFieldTypeFor( XField field ) throws XDocletException
        {
  -             return field.type().qualifiedTypeName() + field.type().dimension();
  +             return field.type().qualifiedName() + field.dimensionAsString();
        }
        /**
         * Iterates over all fields of current class and evaluates the body of the tag
  @@ -46,6 +46,19 @@
        }
   
        /**
  +      * Return standard javadoc of current field.
  +      *
  +      * @return                      Description of the Returned Value
  +      * @exception XDocletException  Description of Exception
  +      * @doc:tag                     type="content"
  +      */
  +     public String firstSentenceDescriptionOfCurrentField() throws XDocletException
  +     {
  +             return firstSentenceDescriptionOfCurrentMember(getCurrentField());
  +     }
  +
  +
  +     /**
         * Returns the name of the current field.
         *
         * @return                      Description of the Returned Value
  @@ -171,7 +184,7 @@
         */
        public void ifHasFieldTag( String template, Properties attributes ) throws 
XDocletException
        {
  -             if( ifHasTag_Impl( template, attributes, FOR_FIELD ) )
  +             if( hasTag( attributes, FOR_FIELD ) )
                        generate( template );
                else
                {
  
  
  
  1.9       +12 -4     xdoclet/core/src/xdoclet/tags/IdTagsHandler.java
  
  Index: IdTagsHandler.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/tags/IdTagsHandler.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -w -r1.8 -r1.9
  --- IdTagsHandler.java        7 Mar 2002 19:57:11 -0000       1.8
  +++ IdTagsHandler.java        24 Mar 2002 17:44:17 -0000      1.9
  @@ -1,6 +1,6 @@
   package xdoclet.tags;
   
  -import com.sun.javadoc.ClassDoc;
  +import xjavadoc.XClass;
   
   import xdoclet.XDocletException;
   import xdoclet.XDocletTagSupport;
  @@ -14,7 +14,7 @@
   /**
    * @author    Ara Abrahamian ([EMAIL PROTECTED])
    * @created   Oct 15, 2001
  - * @version   $Revision: 1.8 $
  + * @version   $Revision: 1.9 $
    */
   public class IdTagsHandler extends XDocletTagSupport
   {
  @@ -104,7 +104,7 @@
         * @return                      Description of the Returned Value
         * @exception XDocletException
         */
  -     private String getIdForClassBy( ClassDoc clazz, String tag_name, String 
param_names ) throws XDocletException
  +     private String getIdForClassBy( XClass clazz, String tag_name, String 
param_names ) throws XDocletException
        {
                if( tag_name == null )
                {
  @@ -122,7 +122,15 @@
   
                while( st.hasMoreTokens() )
                {
  -                     String param_value = getClassTagValue( tag_name, 
st.nextToken(), -1, null, null, true, false );
  +                     String param_value = getTagValue(
  +                             FOR_CLASS,
  +                             tag_name,
  +                             st.nextToken(),
  +                             null,
  +                             null,
  +                             true,
  +                             false
  +                     );
   
                        if( param_value != null )
                                return param_value.replace( '/', '_' );
  
  
  
  1.14      +11 -4     xdoclet/core/src/xdoclet/tags/MergeTagsHandler.java
  
  Index: MergeTagsHandler.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/tags/MergeTagsHandler.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -w -r1.13 -r1.14
  --- MergeTagsHandler.java     9 Mar 2002 23:37:00 -0000       1.13
  +++ MergeTagsHandler.java     24 Mar 2002 17:44:17 -0000      1.14
  @@ -1,6 +1,8 @@
   package xdoclet.tags;
   
  -import com.sun.javadoc.ClassDoc;
  +import xjavadoc.XJavaDoc;
  +import xjavadoc.XClass;
  +import xjavadoc.XJavaDocException;
   
   import org.apache.log4j.Category;
   
  @@ -23,7 +25,7 @@
   /**
    * @author    Ara Abrahamian ([EMAIL PROTECTED])
    * @created   Oct 15, 2001
  - * @version   $Revision: 1.13 $
  + * @version   $Revision: 1.14 $
    */
   public class MergeTagsHandler extends XDocletTagSupport
   {
  @@ -94,7 +96,7 @@
         *      it. {0} is substituted by symbolic class name of current class.
         * @return                    The content of the text file.
         * @see                       #merge(java.lang.String,java.util.Properties)
  -      * @see                       
PackageTagsHandler#packageNameAsPathFor(com.sun.javadoc.PackageDoc)
  +      * @see                       
PackageTagsHandler#packageNameAsPathFor(xjavadoc.XPackage)
         * @see                       ClassTagsHandler#symbolicClassName()
         * @see                       xdoclet.util.FileManager
         */
  @@ -205,7 +207,12 @@
        protected void generateFileUsingTemplate( String dest_file, String 
template_file_name ) throws XDocletException
        {
                Category cat = Log.getCategory( MergeTagsHandler.class, 
"generateFileUsingTemplate" );
  -             ClassDoc[] classes = getContext().getRoot().classes();
  +             XClass[] classes = null;
  +             try {
  +                     XJavaDoc.getInstance().sourceClasses();
  +             } catch( XJavaDocException e ) {
  +                     throw new XDocletException( e, e.getMessage() );
  +             }
                File file = new File( getDocletContext().getDestDir().toString(), 
dest_file );
   
                /*
  
  
  
  1.28      +22 -21    xdoclet/core/src/xdoclet/tags/MethodTagsHandler.java
  
  Index: MethodTagsHandler.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/tags/MethodTagsHandler.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -w -r1.27 -r1.28
  --- MethodTagsHandler.java    7 Mar 2002 22:35:18 -0000       1.27
  +++ MethodTagsHandler.java    24 Mar 2002 17:44:17 -0000      1.28
  @@ -1,13 +1,14 @@
   package xdoclet.tags;
   
  -import com.sun.javadoc.*;
  +import xjavadoc.*;
   
   import xdoclet.XDocletException;
   import xdoclet.ejb.DataObjectSubTask;
   import xdoclet.template.PrettyPrintWriter;
  -import xdoclet.util.DocletUtil;
  +
   import xdoclet.util.TypeConversionUtil;
   import xdoclet.util.Log;
  +import xdoclet.util.DocletUtil;
   import xdoclet.util.Translator;
   
   import java.beans.Introspector;
  @@ -18,13 +19,13 @@
   /**
    * @author    Ara Abrahamian ([EMAIL PROTECTED])
    * @created   Oct 15, 2001
  - * @version   $Revision: 1.27 $
  + * @version   $Revision: 1.28 $
    */
   public class MethodTagsHandler extends AbstractProgramElementTagsHandler
   {
  -     public static String getMethodTypeFor( MethodDoc method ) throws 
XDocletException
  +     public static String getMethodTypeFor( XMethod method ) throws XDocletException
        {
  -             return method.returnType().qualifiedTypeName() + 
method.returnType().dimension();
  +             return method.returnType().qualifiedName() + 
method.returnDimensionAsString();
        }
   
        /**
  @@ -33,7 +34,7 @@
         * @param cur_method  Description of Parameter
         * @return            Description of the Returned Value
         */
  -     public static String getMethodNameWithoutPrefixFor( MethodDoc cur_method )
  +     public static String getMethodNameWithoutPrefixFor( XMethod cur_method )
        {
                String str = cur_method.name();
   
  @@ -45,7 +46,7 @@
                        return str;
        }
   
  -     public static String getPropertyNameFor( MethodDoc method )
  +     public static String getPropertyNameFor( XMethod method )
        {
                String name = getMethodNameWithoutPrefixFor( method );
                int len = name.length();
  @@ -89,7 +90,7 @@
         * @return                      Description of the Returned Value
         * @exception XDocletException
         */
  -     public static boolean hasMethod( ClassDoc clazz, String methodName, String[] 
parameters, boolean setCurrentMethod )
  +     public static boolean hasMethod( XClass clazz, String methodName, String[] 
parameters, boolean setCurrentMethod )
                 throws XDocletException
        {
                return hasExecutableMember( clazz, methodName, parameters, 
setCurrentMethod, FOR_METHOD );
  @@ -115,7 +116,7 @@
                else if( getCurrentMethod().name().startsWith( "set" ) )
                {
                        // For boolean here we don't know if it is get or is, lets 
find it
  -                     String[] params = {getCurrentMethod().returnType().typeName()};
  +                     String[] params = 
{getCurrentMethod().returnType().qualifiedName()};
   
                        if( hasMethod( getCurrentClass(), "is" + 
methodNameWithoutPrefix(), params, false ) )
                                prefix = "is";
  @@ -195,7 +196,7 @@
                        parameters = DocletUtil.tokenizeDelimitedToArray( 
parametersStr, delimiter );
                }
   
  -             MethodDoc oldMethod = getCurrentMethod();
  +             XMethod oldMethod = getCurrentMethod();
   
                if( hasMethod( getCurrentClass(), methodName, parameters, true ) == 
true )
                {
  @@ -307,14 +308,14 @@
                String type_name = attributes.getProperty( "type" );
                int extent = TypeTagsHandler.extractExtentType( 
attributes.getProperty( "extent" ) );
   
  -             ClassDoc[] classes = getAllClasses();
  +             XClass[] classes = getAllClasses();
                SortedSet methods = new TreeSet();
   
                for( int i = 0; i < classes.length; i++ )
                {
                        if( type_name == null || TypeTagsHandler.isOfType( classes[i], 
type_name, extent ) )
                        {
  -                             MethodDoc[] classMethods = classes[i].methods();
  +                             XMethod[] classMethods = classes[i].methods();
   
                                for( int j = 0; j < classMethods.length; j++ )
                                        methods.add( classMethods[j] );
  @@ -326,7 +327,7 @@
   
                while( methodsIterator.hasNext() )
                {
  -                     MethodDoc current = ( MethodDoc ) methodsIterator.next();
  +                     XMethod current = ( XMethod ) methodsIterator.next();
   
                        setCurrentClass( current.containingClass() );
                        setCurrentMethod( current );
  @@ -374,7 +375,7 @@
         */
        public void ifDoesntHaveMethodTag( String template, Properties attributes ) 
throws XDocletException
        {
  -             if( !ifHasTag_Impl( template, attributes, FOR_METHOD ) )
  +             if( !hasTag( attributes, FOR_METHOD ) )
                        generate( template );
                else
                {
  @@ -405,7 +406,7 @@
         */
        public void ifHasMethodTag( String template, Properties attributes ) throws 
XDocletException
        {
  -             if( ifHasTag_Impl( template, attributes, FOR_METHOD ) )
  +             if( hasTag( attributes, FOR_METHOD ) )
                        generate( template );
                else
                {
  @@ -427,7 +428,7 @@
         */
        public void executeAndRestoreMethod( String template, Properties attributes ) 
throws XDocletException
        {
  -             MethodDoc method = getCurrentMethod();
  +             XMethod method = getCurrentMethod();
   
                generate( template );
                setCurrentMethod( method );
  @@ -450,7 +451,7 @@
         */
        public void ifMethodTagValueEquals( String template, Properties attributes ) 
throws XDocletException
        {
  -             if( ifTagValueEquals_Impl( template, attributes, FOR_METHOD ) )
  +             if( isTagValueEqual( attributes, FOR_METHOD ) )
                        generate( template );
        }
   
  @@ -472,7 +473,7 @@
         */
        public void ifMethodTagValueNotEquals( String template, Properties attributes 
) throws XDocletException
        {
  -             if( !ifTagValueEquals_Impl( template, attributes, FOR_METHOD ) )
  +             if( !isTagValueEqual( attributes, FOR_METHOD ) )
                        generate( template );
        }
   
  @@ -548,7 +549,7 @@
         */
        public String firstSentenceDescriptionOfCurrentMethod() throws XDocletException
        {
  -             return getCurrentMethod().firstSentenceTags().length > 0 ? 
getCurrentMethod().firstSentenceTags()[0].text().trim() : "";
  +             return firstSentenceDescriptionOfCurrentMember(getCurrentMethod());
        }
   
        /**
  @@ -689,7 +690,7 @@
                }
                else
                {
  -                     MethodDoc method_doc = ( MethodDoc ) 
getExecutableMemberDocForMemberName( method_name, false, FOR_METHOD );
  +                     XMethod method_doc = ( XMethod ) 
getXExecutableMemberForMemberName( method_name, false, FOR_METHOD );
   
                        //no method with the specified name found in class
                        if( method_doc == null )
  @@ -709,7 +710,7 @@
         * @exception XDocletException  Description of Exception
         * @see                         
#ifHasMethod(java.lang.String,java.util.Properties)
         * @see                         
#ifDoesntHaveMethod(java.lang.String,java.util.Properties)
  -      * @see                         
#hasMethod(com.sun.javadoc.ClassDoc,java.lang.String,java.lang.String[],boolean)
  +      * @see                         
#hasMethod(xjavadoc.XClass,java.lang.String,java.lang.String[],boolean)
         */
        private void ifHasMethod_Impl( String template, Properties attributes, boolean 
has_method ) throws XDocletException
        {
  
  
  
  1.9       +20 -14    xdoclet/core/src/xdoclet/tags/PackageTagsHandler.java
  
  Index: PackageTagsHandler.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/tags/PackageTagsHandler.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -w -r1.8 -r1.9
  --- PackageTagsHandler.java   9 Mar 2002 23:37:00 -0000       1.8
  +++ PackageTagsHandler.java   24 Mar 2002 17:44:17 -0000      1.9
  @@ -1,7 +1,9 @@
   package xdoclet.tags;
   
  -import com.sun.javadoc.ClassDoc;
  -import com.sun.javadoc.PackageDoc;
  +import xjavadoc.XJavaDoc;
  +import xjavadoc.XClass;
  +import xjavadoc.XPackage;
  +import xjavadoc.XJavaDocException;
   
   import xdoclet.XDocletException;
   import xdoclet.DocletContext;
  @@ -14,11 +16,11 @@
   /**
    * @author    Ara Abrahamian ([EMAIL PROTECTED])
    * @created   Oct 14, 2001
  - * @version   $Revision: 1.8 $
  + * @version   $Revision: 1.9 $
    */
   public class PackageTagsHandler extends AbstractProgramElementTagsHandler
   {
  -     public static String getPackageNameFor( PackageDoc pak )
  +     public static String getPackageNameFor( XPackage pak )
        {
                return getPackageNameFor( pak.name() );
        }
  @@ -31,14 +33,14 @@
         */
        public static String getPackageNameFor( String packageName )
        {
  -             Vector package_substitutions = getPackageSubstitutions( 
DocletContext.getInstance().getActiveSubTask().getSubTaskName() );
  +             ArrayList package_substitutions = getPackageSubstitutions( 
DocletContext.getInstance().getActiveSubTask().getSubTaskName() );
   
                if( package_substitutions == null )
                        return packageName;
   
                for( int i = 0; i < package_substitutions.size(); i++ )
                {
  -                     PackageSubstitution ps = ( PackageSubstitution ) 
package_substitutions.elementAt( i );
  +                     PackageSubstitution ps = ( PackageSubstitution ) 
package_substitutions.get( i );
                        StringTokenizer st = new StringTokenizer( ps.getPackages(), 
",", false );
   
                        while( st.hasMoreTokens() )
  @@ -57,10 +59,10 @@
                return packageName;
        }
   
  -     public static Vector getPackageSubstitutions( String subtask_name )
  +     public static ArrayList getPackageSubstitutions( String subtask_name )
        {
                //SubTask's packageSubstitutions has precedence over the global 
packageSubstitutions defined in DocletTask
  -             Vector package_substitutions = null;
  +             ArrayList package_substitutions = null;
                boolean supports_package_substitution_inheritance = true;
   
                Boolean supports = ( ( Boolean ) 
DocletContext.getInstance().getConfigParam( subtask_name + 
".packageSubstitutionInheritanceSupported" ) );
  @@ -68,11 +70,11 @@
                if( supports != null )
                        supports_package_substitution_inheritance = 
supports.booleanValue();
   
  -             package_substitutions = ( Vector ) 
DocletContext.getInstance().getConfigParam( subtask_name + ".packageSubstitutions" );
  +             package_substitutions = ( ArrayList ) 
DocletContext.getInstance().getConfigParam( subtask_name + ".packageSubstitutions" );
   
                //nothing specified for subtask, inherit the one from DocletTask
                if( supports_package_substitution_inheritance && ( 
package_substitutions == null || package_substitutions.isEmpty() ) )
  -                     package_substitutions = ( Vector ) 
DocletContext.getInstance().getConfigParam( "packageSubstitutions" );
  +                     package_substitutions = ( ArrayList ) 
DocletContext.getInstance().getConfigParam( "packageSubstitutions" );
   
                return package_substitutions;
        }
  @@ -84,7 +86,7 @@
         * @return     current package name as path
         * @doc:tag    type="content"
         */
  -     public static String packageNameAsPathFor( PackageDoc pak )
  +     public static String packageNameAsPathFor( XPackage pak )
        {
                return getPackageNameFor( pak ).replace( '.', '/' );
        }
  @@ -168,7 +170,8 @@
         */
        public void forAllPackages( String template, Properties attributes ) throws 
XDocletException
        {
  -             ClassDoc[] classes = getDocletContext().getRoot().classes();
  +             try {
  +             XClass[] classes = XJavaDoc.getInstance().sourceClasses();
                SortedSet packages = new TreeSet();
   
                for( int i = 0; i < classes.length; i++ )
  @@ -176,17 +179,20 @@
                        packages.add( classes[i].containingPackage() );
                }
   
  -             PackageDoc cur_package = null;
  +             XPackage cur_package = null;
   
                for( Iterator packageIterator = packages.iterator(); 
packageIterator.hasNext();  )
                {
  -                     cur_package = ( PackageDoc ) packageIterator.next();
  +                     cur_package = ( XPackage ) packageIterator.next();
                        setCurrentPackage( cur_package );
                        generate( template );
                }
                // restore current package to null, so subsequent class iterations can
                // perform outside the context of a current packages
                setCurrentPackage( null );
  +             } catch( XJavaDocException e ) {
  +                     throw new XDocletException( e, e.getMessage() );
  +             }
        }
   
        /**
  
  
  
  1.8       +29 -20    xdoclet/core/src/xdoclet/tags/ParameterTagsHandler.java
  
  Index: ParameterTagsHandler.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/tags/ParameterTagsHandler.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -w -r1.7 -r1.8
  --- ParameterTagsHandler.java 28 Feb 2002 16:17:17 -0000      1.7
  +++ ParameterTagsHandler.java 24 Mar 2002 17:44:17 -0000      1.8
  @@ -1,11 +1,10 @@
   package xdoclet.tags;
   
  -import com.sun.javadoc.ExecutableMemberDoc;
  -import com.sun.javadoc.Parameter;
  -import com.sun.javadoc.ParamTag;
  -import com.sun.javadoc.ProgramElementDoc;
  +import xjavadoc.XExecutableMember;
  +import xjavadoc.XParameter;
  +import xjavadoc.XTag;
  +import xjavadoc.XProgramElement;
   import xdoclet.XDocletException;
  -import xdoclet.util.DocletUtil;
   
   import java.util.Properties;
   import java.util.StringTokenizer;
  @@ -13,7 +12,7 @@
   /**
    * @author    Ara Abrahamian ([EMAIL PROTECTED])
    * @created   Oct 15, 2001
  - * @version   $Revision: 1.7 $
  + * @version   $Revision: 1.8 $
    */
   public class ParameterTagsHandler extends AbstractProgramElementTagsHandler
   {
  @@ -23,7 +22,7 @@
         *
         * @see   #forAllMethodParams(java.lang.String)
         */
  -     protected static Parameter currentMethodParameter;
  +     protected static XParameter currentMethodParameter;
   
        /**
         * The <code>currentMethodParamTag</code> holds the current ParamTag
  @@ -31,7 +30,7 @@
         *
         * @see   #forAllMethodParams(java.lang.String)
         */
  -     protected static ParamTag currentMethodParamTag;
  +     protected static XTag currentMethodParamTag;
   
        /**
         * Returns the type of the current method parameter, current method parameter
  @@ -43,7 +42,7 @@
         */
        public String methodParamType() throws XDocletException
        {
  -             return currentMethodParameter.type().toString();
  +             return currentMethodParameter.type().qualifiedName();
        }
   
        /**
  @@ -62,7 +61,7 @@
                }
                // end of if ()
   
  -             return currentMethodParamTag.parameterComment();
  +             return currentMethodParamTag.value();
        }
   
        /**
  @@ -94,7 +93,7 @@
                 * ParamTag[] paramTags = getCurrentMethod().paramTags();
                 * for( int k = 0; k < parameters.length; k++ )
                 * {
  -              * currentMethodParameter = parameters[k];
  +              * currentMethodparameter = parameters[k];
                 * currentMethodParamTag = null;
                 * for ( int j = 0; j < paramTags.length; j++)
                 * {
  @@ -124,7 +123,7 @@
                 * Parameter[] parameters = getCurrentConstructor().parameters();
                 * for( int k = 0; k < parameters.length; k++ )
                 * {
  -              * currentMethodParameter = parameters[k];
  +              * currentMethodparameter = parameters[k];
                 * generate( template );
                 * }
                 */
  @@ -145,14 +144,16 @@
        {
                String incl = ( String ) attributes.get( "includeDefinition" );
   
  -             Parameter[] parameters = getCurrentMethod().parameters();
  +             XParameter[] parameters = getCurrentMethod().parameters();
                StringBuffer st = new StringBuffer();
                String type = null;
                String name = null;
   
                for( int i = 0; i < parameters.length; i++ )
                {
  -                     type = parameters[i].type().toString();
  +                     type = parameters[i].type().qualifiedName();
  +            String methodDimension = parameters[i].dimensionAsString();
  +
                        name = parameters[i].name();
   
                        if( i > 0 )
  @@ -161,7 +162,7 @@
                        }
                        if( incl == null || !incl.equals( "false" ) )
                        {
  -                             st.append( type ).append( ' ' ).append( name );
  +                st.append( type ).append(methodDimension).append( ' ' ).append( 
name );
                        }
                        else
                        {
  @@ -188,7 +189,7 @@
        public void forAllParameterTypes( String template, Properties attributes ) 
throws XDocletException
        {
                String param_name = attributes.getProperty( "paramName" );
  -             String value = getParameterValue( DocletUtil.getText( getCurrentTag() 
), param_name, -1 );
  +             String value = getCurrentTag().attributeValue( param_name );
                String old_token = currentToken;
   
                // findAll(int p1, int p2) -> int p1, int p2
  @@ -215,10 +216,10 @@
                currentToken = old_token;
        }
   
  -     private void forAllParams( ExecutableMemberDoc member, String template ) 
throws XDocletException
  +     private void forAllParams( XExecutableMember member, String template ) throws 
XDocletException
        {
  -             Parameter[] parameters = member.parameters();
  -             ParamTag[] paramTags = member.paramTags();
  +             XParameter[] parameters = member.parameters();
  +             XTag[] paramTags = member.doc().tags("param");
   
                for( int k = 0; k < parameters.length; k++ )
                {
  @@ -226,7 +227,15 @@
                        currentMethodParamTag = null;
                        for( int j = 0; j < paramTags.length; j++ )
                        {
  -                             if( currentMethodParameter.name().equals( 
paramTags[j].parameterName() ) )
  +                             // find @param xxx
  +                             String paramTagValue = paramTags[j].value();
  +                             StringTokenizer st = new 
StringTokenizer(paramTagValue);
  +                             String paramTagParam = null;
  +                             if( st.hasMoreTokens() ) {
  +                                     paramTagParam = st.nextToken();
  +                             }
  +
  +                             if( currentMethodParameter.name().equals( 
paramTagParam ) )
                                {
                                        currentMethodParamTag = paramTags[j];
                                        break;
  
  
  
  1.3       +34 -34    xdoclet/core/src/xdoclet/tags/PropertyTagsHandler.java
  
  Index: PropertyTagsHandler.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/tags/PropertyTagsHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -w -r1.2 -r1.3
  --- PropertyTagsHandler.java  1 Mar 2002 03:52:19 -0000       1.2
  +++ PropertyTagsHandler.java  24 Mar 2002 17:44:17 -0000      1.3
  @@ -1,12 +1,12 @@
   
   package xdoclet.tags;
   
  -import com.sun.javadoc.*;
  +import xjavadoc.*;
   
   import xdoclet.XDocletException;
   import xdoclet.ejb.DataObjectSubTask;
   import xdoclet.template.PrettyPrintWriter;
  -import xdoclet.util.DocletUtil;
  +
   import xdoclet.util.TypeConversionUtil;
   import xdoclet.util.Log;
   import xdoclet.util.Translator;
  @@ -61,21 +61,21 @@
   
                // end of if ()
   
  -             ClassDoc oldClass = getCurrentClass();
  +             XClass oldClass = getCurrentClass();
                List already = new ArrayList();
   
                //loop over superclasses
                do
                {
  -                     MethodDoc[] methods = getCurrentClass().methods();
  -                     MethodDoc old_cur_method = getCurrentMethod();
  +                     XMethod[] methods = getCurrentClass().methods();
  +                     XMethod old_cur_method = getCurrentMethod();
   
                        for( int j = 0; j < methods.length; j++ )
                        {
  -                             MethodDoc current_method = methods[j];
  +                             XMethod current_method = methods[j];
   
                                cat.debug( "looking at method " + 
current_method.name() );
  -                             if( DocletUtil.hasTag( current_method, requiredTag ) )
  +                             if( current_method.doc().hasTag( requiredTag ) )
                                {
                                        setCurrentMethod( current_method );
   
  @@ -118,11 +118,11 @@
         */
        public void ifHasGetMethodWithTag( String template, Properties attributes ) 
throws XDocletException
        {
  -             MethodDoc get_method = getGetMethodWithTag( attributes );
  +             XMethod get_method = getGetMethodWithTag( attributes );
   
                if( get_method != null )
                {
  -                     MethodDoc old_method = getCurrentMethod();
  +                     XMethod old_method = getCurrentMethod();
   
                        setCurrentMethod( get_method );
                        try
  @@ -154,11 +154,11 @@
         */
        public void ifHasSetMethodWithTag( String template, Properties attributes ) 
throws XDocletException
        {
  -             MethodDoc set_method = getSetMethodWithTag( attributes );
  +             XMethod set_method = getSetMethodWithTag( attributes );
   
                if( set_method != null )
                {
  -                     MethodDoc old_method = getCurrentMethod();
  +                     XMethod old_method = getCurrentMethod();
   
                        setCurrentMethod( set_method );
                        try
  @@ -189,7 +189,7 @@
         */
        public String propertyTypeWithTag( Properties attributes ) throws 
XDocletException
        {
  -             MethodDoc getter = getGetMethodWithTag( attributes );
  +             XMethod getter = getGetMethodWithTag( attributes );
   
                if( getter != null )
                {
  @@ -198,34 +198,34 @@
   
                // end of if ()
   
  -             MethodDoc setter = getSetMethodWithTag( attributes );
  +             XMethod setter = getSetMethodWithTag( attributes );
   
                if( setter != null )
                {
  -                     Parameter parameter = setter.parameters()[0];
  +                     XParameter parameter = setter.parameters()[0];
   
  -                     return parameter.type().toString();
  +                     return parameter.type().qualifiedName();
                }
                // end of if ()
                throw new XDocletException( "no current property found" );
        }
   
        /**
  -      * Searches for the MethodDoc of the method with name methodName and returns
  -      * it. Copied from MethodTagsHandler
  +      * Searches for the XMethod of the method with name methodName and returns it.
  +      * Copied from MethodTagsHandler
         *
         * @param methodName  Description of Parameter
  -      * @return            The MethodDocForMethodName value
  +      * @return            The XMethodForMethodName value
         */
  -     protected MethodDoc getMethodDocForMethodName( String methodName )
  +     protected XMethod getXMethodForMethodName( String methodName )
        {
                if( methodName != null )
  -                     return extractMethodDoc( getCurrentClass(), methodName );
  +                     return extractXMethod( getCurrentClass(), methodName );
   
                return null;
        }
   
  -     private MethodDoc getGetMethodWithTag( Properties attributes ) throws 
XDocletException
  +     private XMethod getGetMethodWithTag( Properties attributes ) throws 
XDocletException
        {
                String requiredTag = attributes.getProperty( "tagName" );
   
  @@ -236,11 +236,11 @@
   
                // end of if ()
   
  -             MethodDoc current_method = getCurrentMethod();
  +             XMethod current_method = getCurrentMethod();
   
                if( current_method.name().startsWith( "get" ) || 
current_method.name().startsWith( "is" ) )
                {
  -                     if( DocletUtil.hasTag( current_method, requiredTag ) )
  +                     if( current_method.doc().hasTag(  requiredTag ) )
                        {
                                return current_method;
                        }
  @@ -252,11 +252,11 @@
                // end of if ()
   
                String attributeName = 
MethodTagsHandler.getMethodNameWithoutPrefixFor( current_method );
  -             MethodDoc getter = getMethodDocForMethodName( "get" + attributeName );
  +             XMethod getter = getXMethodForMethodName( "get" + attributeName );
   
                if( getter != null )
                {
  -                     if( DocletUtil.hasTag( getter, requiredTag ) )
  +                     if( getter.doc().hasTag( requiredTag ) )
                        {
   
                                return getter;
  @@ -266,16 +266,16 @@
                        return null;
                }
                // end of if ()
  -             getter = getMethodDocForMethodName( "is" + attributeName );
  +             getter = getXMethodForMethodName( "is" + attributeName );
                //not too safe.. should check it's boolean.
  -             if( getter != null && DocletUtil.hasTag( getter, requiredTag ) )
  +             if( getter != null && getter.doc().hasTag( requiredTag ) )
                {
                        return getter;
                }
                return null;
        }
   
  -     private MethodDoc getSetMethodWithTag( Properties attributes ) throws 
XDocletException
  +     private XMethod getSetMethodWithTag( Properties attributes ) throws 
XDocletException
        {
                String requiredTag = attributes.getProperty( "tagName" );
   
  @@ -286,11 +286,11 @@
   
                // end of if ()
   
  -             MethodDoc current_method = getCurrentMethod();
  +             XMethod current_method = getCurrentMethod();
   
                if( current_method.name().startsWith( "set" ) )
                {
  -                     if( DocletUtil.hasTag( current_method, requiredTag ) )
  +                     if( current_method.doc().hasTag( requiredTag ) )
                        {
                                return current_method;
                        }
  @@ -302,9 +302,9 @@
                // end of if ()
   
                String attributeName = 
MethodTagsHandler.getMethodNameWithoutPrefixFor( current_method );
  -             MethodDoc setter = getMethodDocForMethodName( "set" + attributeName );
  +             XMethod setter = getXMethodForMethodName( "set" + attributeName );
   
  -             if( setter != null && DocletUtil.hasTag( setter, requiredTag ) )
  +             if( setter != null && setter.doc().hasTag( requiredTag ) )
                {
   
                        return setter;
  @@ -315,9 +315,9 @@
        }
   
        //copied from MethodTagsHandler
  -     private MethodDoc extractMethodDoc( ClassDoc clazz, String methodName )
  +     private XMethod extractXMethod( XClass clazz, String methodName )
        {
  -             MethodDoc[] methods = clazz.methods();
  +             XMethod[] methods = clazz.methods();
   
                for( int i = 0; i < methods.length; i++ )
                {
  
  
  
  1.2       +5 -4      xdoclet/core/src/xdoclet/tags/TranslatorTagsHandler.java
  
  Index: TranslatorTagsHandler.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/tags/TranslatorTagsHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -r1.1 -r1.2
  --- TranslatorTagsHandler.java        4 Feb 2002 23:11:22 -0000       1.1
  +++ TranslatorTagsHandler.java        24 Mar 2002 17:44:17 -0000      1.2
  @@ -1,19 +1,20 @@
   package xdoclet.tags;
   
  -import com.sun.javadoc.ClassDoc;
  -import com.sun.javadoc.Tag;
  +import xjavadoc.XClass;
  +import xjavadoc.XTag;
   
   import xdoclet.XDocletException;
   import xdoclet.XDocletTagSupport;
  -import xdoclet.util.DocletUtil;
  +
   import xdoclet.util.Translator;
  +import xdoclet.util.DocletUtil;
   
   import java.util.Properties;
   
   /**
    * @author    <a href="mailto:[EMAIL PROTECTED]";>Andrew Stevens</a>
    * @created   Jan 24, 2002
  - * @version   $Revision: 1.1 $
  + * @version   $Revision: 1.2 $
    */
   public class TranslatorTagsHandler extends XDocletTagSupport
   {
  
  
  
  1.13      +48 -34    xdoclet/core/src/xdoclet/tags/TypeTagsHandler.java
  
  Index: TypeTagsHandler.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/tags/TypeTagsHandler.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -w -r1.12 -r1.13
  --- TypeTagsHandler.java      11 Mar 2002 13:42:48 -0000      1.12
  +++ TypeTagsHandler.java      24 Mar 2002 17:44:17 -0000      1.13
  @@ -1,7 +1,7 @@
   package xdoclet.tags;
   
  -import com.sun.javadoc.ClassDoc;
  -import com.sun.javadoc.Type;
  +import xjavadoc.XClass;
  +import xjavadoc.XJavaDoc;
   import xdoclet.XDocletException;
   import xdoclet.XDocletTagSupport;
   import xdoclet.util.Log;
  @@ -16,7 +16,7 @@
    *
    * @author    Dmitri Colebatch ([EMAIL PROTECTED])
    * @created   October 12, 2001
  - * @version   $Revision: 1.12 $
  + * @version   $Revision: 1.13 $
    */
   public class TypeTagsHandler extends XDocletTagSupport
   {
  @@ -35,7 +35,8 @@
         * should be checked for equality, but also direct superclasses and interfaces
         * of the entity.
         */
  -     public final static int TYPE_SUPERCLASS = 1;
  +     //seems it's not used (Aslak)
  +     //private final static int TYPE_SUPERCLASS = 1;
   
        /**
         * Used by isOfType. isOfType searches for the type according to the type
  @@ -100,12 +101,13 @@
         * @param type      Description of Parameter
         * @param cur_type  Description of Parameter
         * @return          The OfType value
  +      * @todo move this to xjavadoc
         */
  -     public static boolean isOfType( Type cur_type, String type, int extent )
  +     public static boolean isOfType( XClass cur_type, String type, int extent )
        {
  -             if( cur_type instanceof ClassDoc )
  +             if( cur_type instanceof XClass )
                {
  -                     ClassDoc cur_class = ( ClassDoc ) cur_type;
  +                     XClass cur_class = ( XClass ) cur_type;
   
                        do
                        {
  @@ -125,7 +127,7 @@
                                        else
                                        {
                                                // if one of implemented interfaces 
implements somewhere in its hierarchy ...
  -                                             ClassDoc[] interfaces = 
cur_class.interfaces();
  +                                             XClass[] interfaces = 
cur_class.interfaces();
   
                                                for( int j = 0; j < interfaces.length; 
j++ )
                                                {
  @@ -184,8 +186,9 @@
                        return TYPE_HIERARCHY;
                else if( extent_str.equalsIgnoreCase( "concrete-type" ) )
                        return TYPE_CONCRETE_TYPE;
  -             else if( extent_str.equalsIgnoreCase( "superclass" ) )
  -                     return TYPE_SUPERCLASS;
  +// seems it's not used
  +//           else if( extent_str.equalsIgnoreCase( "superclass" ) )
  +//                   return TYPE_SUPERCLASS;
                else if( extent_str.equalsIgnoreCase( "hierarchy" ) )
                        return TYPE_HIERARCHY;
                else
  @@ -199,9 +202,9 @@
         * @param derived_from   Description of Parameter
         * @return               The InterfaceDerivedFrom value
         * @see                  #isInTypeList(java.lang.String,java.lang.String)
  -      * @see                  #isOfType(com.sun.javadoc.Type,java.lang.String,int)
  +      * @see                  #isOfType(xjavadoc.Type,java.lang.String,int)
         */
  -     private static boolean isInterfaceDerivedFrom( ClassDoc cur_interface, String 
derived_from )
  +     private static boolean isInterfaceDerivedFrom( XClass cur_interface, String 
derived_from )
        {
                //if cur_interface is one of the classes in the derived-from list
                if( isInTypeList( derived_from, cur_interface.qualifiedName() ) == 
true )
  @@ -209,7 +212,7 @@
                else
                {
                        // parents
  -                     ClassDoc[] interfaces = cur_interface.interfaces();
  +                     XClass[] interfaces = cur_interface.interfaces();
   
                        for( int i = 0; i < interfaces.length; i++ )
                        {
  @@ -420,30 +423,41 @@
        {
                String value = attributes.getProperty( "value" );
                String type_name = attributes.getProperty( "type" );
  +      String type_dim = "";
                int extent = extractExtentType( attributes.getProperty( "extent" ) );
  -             Type cur_type = null;
  +             XClass cur_type = null;
  +      String cur_dim_str = "";
   
  -             if( value == null || value.equalsIgnoreCase( "class" ) )
  +      //strip away [] from type_name and put it in type_dim
  +      int array_dim_in_type_name_index = type_name.indexOf( '[' );
  +      if( array_dim_in_type_name_index != -1 )
  +      {
  +         type_dim = type_name.substring( array_dim_in_type_name_index );
  +         type_name = type_name.substring( 0, array_dim_in_type_name_index );
  +      }
  +
  +       if( value == null )
                {
                        cur_type = getCurrentClass();
                }
  +      else
  +      {
  +         if( value.equalsIgnoreCase( "class" ) )
  +            cur_type = getCurrentClass();
                else if( value.equalsIgnoreCase( "return-type" ) )
                {
                        cur_type = getCurrentMethod().returnType();
  -
  -                     if( cur_type.asClassDoc() != null )
  -                             cur_type = cur_type.asClassDoc();
  +            cur_dim_str = getCurrentMethod().returnDimensionAsString();
                }
                else
                {
                        //full class name literally specified
  -                     cur_type = getDocletContext().getRoot().classNamed( value );
  +            cur_type = XJavaDoc.getInstance().getXClass( value );
  +         }
                }
   
  -             // if the current type is null, then it must be a primitive
  -             if( cur_type == null && 
getCurrentMethod().returnType().typeName().equals( type_name ) == condition )
  -                     generate( template );
  -             else if( isOfType( cur_type, type_name, extent ) == condition )
  +      //if of that type and dimension
  +             if( isOfType( cur_type, type_name, extent ) == condition && 
type_dim.equals( cur_dim_str ) == condition )
                        generate( template );
        }
   
  
  
  
  1.5       +4 -4      xdoclet/core/src/xdoclet/tags/XmlTagsHandler.java
  
  Index: XmlTagsHandler.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/tags/XmlTagsHandler.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -r1.4 -r1.5
  --- XmlTagsHandler.java       2 Mar 2002 09:35:37 -0000       1.4
  +++ XmlTagsHandler.java       24 Mar 2002 17:44:17 -0000      1.5
  @@ -1,13 +1,13 @@
   package xdoclet.tags;
   
  -import com.sun.javadoc.ClassDoc;
  -import com.sun.javadoc.Tag;
  +import xjavadoc.XClass;
  +import xjavadoc.XTag;
   
   import xdoclet.DocletContext;
   import xdoclet.XDocletException;
   import xdoclet.XDocletTagSupport;
   import xdoclet.XmlSubTask;
  -import xdoclet.util.DocletUtil;
  +
   import xdoclet.util.Translator;
   
   import java.util.Properties;
  @@ -18,7 +18,7 @@
    *
    * @author    <a href="mailto:[EMAIL PROTECTED]";>Andrew Stevens</a>
    * @created   Dec 20, 2001
  - * @version   $Revision: 1.4 $
  + * @version   $Revision: 1.5 $
    */
   public class XmlTagsHandler extends XDocletTagSupport
   {
  
  
  
  1.25      +80 -150   
xdoclet/core/src/xdoclet/tags/AbstractProgramElementTagsHandler.java
  
  Index: AbstractProgramElementTagsHandler.java
  ===================================================================
  RCS file: 
/cvsroot/xdoclet/xdoclet/core/src/xdoclet/tags/AbstractProgramElementTagsHandler.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -w -r1.24 -r1.25
  --- AbstractProgramElementTagsHandler.java    14 Mar 2002 20:42:38 -0000      1.24
  +++ AbstractProgramElementTagsHandler.java    24 Mar 2002 17:44:17 -0000      1.25
  @@ -1,13 +1,15 @@
   package xdoclet.tags;
   
  -import com.sun.javadoc.ClassDoc;
  -import com.sun.javadoc.MemberDoc;
  -import com.sun.javadoc.FieldDoc;
  -import com.sun.javadoc.MethodDoc;
  -import com.sun.javadoc.ExecutableMemberDoc;
  -import com.sun.javadoc.Parameter;
  -import com.sun.javadoc.ConstructorDoc;
  -import com.sun.javadoc.Tag;
  +import xjavadoc.XJavaDoc;
  +import xjavadoc.XClass;
  +import xjavadoc.XMember;
  +import xjavadoc.XField;
  +import xjavadoc.XMethod;
  +import xjavadoc.XExecutableMember;
  +import xjavadoc.XParameter;
  +import xjavadoc.XConstructor;
  +import xjavadoc.XTag;
  +import xjavadoc.XJavaDocException;
   
   import org.apache.log4j.Category;
   
  @@ -16,7 +18,7 @@
   import xdoclet.XDocletException;
   import xdoclet.XDocletTagSupport;
   import xdoclet.template.PrettyPrintWriter;
  -import xdoclet.util.DocletUtil;
  +
   import xdoclet.util.TypeConversionUtil;
   import xdoclet.util.Log;
   import xdoclet.util.Translator;
  @@ -30,7 +32,7 @@
   /**
    * @author    Ara Abrahamian ([EMAIL PROTECTED])
    * @created   Oct 15, 2001
  - * @version   $Revision: 1.24 $
  + * @version   $Revision: 1.25 $
    */
   public abstract class AbstractProgramElementTagsHandler extends XDocletTagSupport
   {
  @@ -59,8 +61,8 @@
                {
                        public int compare( Object o1, Object o2 )
                        {
  -                             MemberDoc m1 = ( MemberDoc ) o1;
  -                             MemberDoc m2 = ( MemberDoc ) o2;
  +                             XMember m1 = ( XMember ) o1;
  +                             XMember m2 = ( XMember ) o2;
   
                                return m1.name().compareTo( m2.name() );
                        }
  @@ -80,7 +82,7 @@
         * @return       Description of the Returned Value
         * @doc:tag      type="content"
         */
  -     public static String getClassNameFor( ClassDoc clazz )
  +     public static String getClassNameFor( XClass clazz )
        {
                return clazz.name();
        }
  @@ -92,7 +94,7 @@
         * @return       Description of the Returned Value
         * @doc:tag      type="content"
         */
  -     public static String getFullClassNameFor( ClassDoc clazz )
  +     public static String getFullClassNameFor( XClass clazz )
        {
                return clazz.qualifiedName();
        }
  @@ -104,7 +106,7 @@
         * @return       Description of the Returned Value
         * @doc:tag      type="content"
         */
  -     public static String getFullSuperclassNameFor( ClassDoc clazz )
  +     public static String getFullSuperclassNameFor( XClass clazz )
        {
                if( clazz.superclass() != null )
                        return clazz.superclass().qualifiedName();
  @@ -119,23 +121,27 @@
         *
         * @return   An array with all classes in that context in it.
         */
  -     public static ClassDoc[] getAllClasses()
  +     public static XClass[] getAllClasses() throws XDocletException
        {
  +             try {
                if( DocletContext.getInstance().getActiveSubTask().getCurrentPackage() 
== null )
                        // not in a forAllPackages context
  -                     return DocletContext.getInstance().getRoot().classes();
  +                             return XJavaDoc.getInstance().sourceClasses();
                else
  -                     return 
DocletContext.getInstance().getActiveSubTask().getCurrentPackage().allClasses();
  +                             return 
DocletContext.getInstance().getActiveSubTask().getCurrentPackage().classes();
  +             } catch ( XJavaDocException e ) {
  +                     throw new XDocletException(e,e.getMessage());
  +             }
        }
   
  -     protected static boolean hasExecutableMember( ClassDoc clazz, String 
executableMemberName, String[] parameters, boolean setCurrentExecutableMember, int 
for_type )
  +     protected static boolean hasExecutableMember( XClass clazz, String 
executableMemberName, String[] parameters, boolean setCurrentExecutableMember, int 
for_type )
                 throws XDocletException
        {
  -             Category cat = Log.getCategory( ConstructorTagsHandler.class, 
"hasConstructor" );
  +             Category cat = Log.getCategory( 
AbstractProgramElementTagsHandler.class, "hasExecutableMember" );
   
                while( clazz != null )
                {
  -                     ExecutableMemberDoc[] executableMembers = null;
  +                     XExecutableMember[] executableMembers = null;
   
                        switch ( for_type )
                        {
  @@ -157,16 +163,19 @@
                                        // All parameters must be equal to have 
"constructor equality"
                                        if( parameters != null )
                                        {
  -                                             Parameter[] params = 
executableMembers[i].parameters();
  +                                             XParameter[] params = 
executableMembers[i].parameters();
   
  -                                             cat.debug( "params.length=" + 
params.length );
  +                                             if (cat.isDebugEnabled()) cat.debug( 
"params.length=" + params.length );
   
                                                for( int j = 0; j < params.length; j++ 
)
                                                {
  -                                                     cat.debug( 
"params[j].typeName()=" + params[j].typeName() );
  +                            if (cat.isDebugEnabled()){
  +                                cat.debug( "params[j].type().qualifiedName()=" + 
params[j].type().qualifiedName() );
                                                        cat.debug( "parameters[j]=" + 
parameters[j] );
  -
  -                                                     if( parameters == null || 
!params[j].typeName().equals( parameters[j] ) )
  +                            }
  +                            StringBuffer sb = new StringBuffer();
  +                            
sb.append(params[j].type().qualifiedName()).append(params[j].dimensionAsString());
  +                                                     if( parameters == null || 
!sb.toString().equals( parameters[j] ) )
                                                                continue loop;
                                                }
                                        }
  @@ -177,10 +186,10 @@
                                                switch ( for_type )
                                                {
                                                case FOR_CONSTRUCTOR:
  -                                                     setCurrentConstructor( ( 
ConstructorDoc ) executableMembers[i] );
  +                                                     setCurrentConstructor( ( 
XConstructor ) executableMembers[i] );
                                                        break;
                                                case FOR_METHOD:
  -                                                     setCurrentMethod( ( MethodDoc 
) executableMembers[i] );
  +                                                     setCurrentMethod( ( XMethod ) 
executableMembers[i] );
                                                        break;
                                                default:
                                                        throw new XDocletException( 
"Bad type: " + for_type );
  @@ -215,60 +224,6 @@
        }
   
        /**
  -      * A utility method used by ifMethodTagValueEquals/ifMethodTagValueNotEquals
  -      * and ifClassTagValueEquals/ifClassTagValueNotEquals, return true if the value
  -      * of the tag/parameter equals with value.
  -      *
  -      * @param template              The body of the block tag
  -      * @param attributes            The attributes of the template tag
  -      * @param FOR_TYPE
  -      * @return                      Description of the Returned Value
  -      * @exception XDocletException  Description of Exception
  -      */
  -     public boolean ifTagValueEquals_Impl( String template, Properties attributes, 
int FOR_TYPE ) throws XDocletException
  -     {
  -             String value = attributes.getProperty( "value" );
  -             String tag_name = attributes.getProperty( "tagName" );
  -             String param_name = attributes.getProperty( "paramName" );
  -             String param_num = attributes.getProperty( "paramNum" );
  -             String tn = attributes.getProperty( "tokenNumber" );
  -             String delimiter = attributes.getProperty( "delimiter" );
  -             String return_delimiters = attributes.getProperty( "returnDelimiters" 
);
  -             String param_value = null;
  -             int param_int = -1;
  -
  -             if( param_num != null )
  -                     param_int = Integer.valueOf( param_num ).intValue();
  -
  -             // if currentTag is set first check against it, this is needed for 
forAll... tags
  -             // where currentTag is set by these tags and we don't need/want to 
delegate the
  -             // lookup to the surrounding current class or method.
  -             if( getCurrentTag() != null && getCurrentTag().name().equals( "@" + 
tag_name ) )
  -             {
  -                     Tag the_tag = getCurrentTag();
  -                     String tag_value = DocletUtil.getText( the_tag );
  -
  -                     param_value = getParameterValue( tag_value, param_name, 
param_int );
  -             }
  -             else
  -             {
  -                     param_value = getTagValue( tag_name, param_name, param_int, 
null, null, null, null, null, true, FOR_TYPE, false );
  -             }
  -
  -             if( param_value != null )
  -             {
  -                     param_value = tokenizeValue( param_value, tn, delimiter, 
return_delimiters );
  -
  -                     if( param_value.equals( value ) )
  -                             return true;
  -                     else
  -                             return false;
  -             }
  -             else
  -                     return false;
  -     }
  -
  -     /**
         * 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.
  @@ -322,32 +277,32 @@
                return "";
        }
   
  -     protected ExecutableMemberDoc getExecutableMemberDocForMemberName( String 
memberName, int for_type ) throws XDocletException
  +     protected XExecutableMember getXExecutableMemberForMemberName( String 
memberName, int for_type ) throws XDocletException
        {
                if( memberName != null )
  -                     return extractExecutableMemberDoc( getCurrentClass(), 
memberName, for_type );
  +                     return extractXExecutableMember( getCurrentClass(), 
memberName, for_type );
   
                return null;
        }
   
        /**
  -      * Searches for the ExecutableMemberDoc of the member with name methodName and
  +      * Searches for the XExecutableMember of the member with name methodName and
         * returns it.
         *
         * @param superclasses          Search superclasses.
         * @param memberName
         * @param for_type
  -      * @return                      The MethodDoc for the method named value
  +      * @return                      The XMethod for the method named value
         * @exception XDocletException
         */
  -     protected ExecutableMemberDoc getExecutableMemberDocForMemberName( String 
memberName, boolean superclasses, int for_type ) throws XDocletException
  +     protected XExecutableMember getXExecutableMemberForMemberName( String 
memberName, boolean superclasses, int for_type ) throws XDocletException
        {
                if( !superclasses )
  -                     return getExecutableMemberDocForMemberName( memberName, 
for_type );
  +                     return getXExecutableMemberForMemberName( memberName, for_type 
);
   
  -             for( ClassDoc clazz = getCurrentClass(); clazz != null; clazz = 
clazz.superclass() )
  +             for( XClass clazz = getCurrentClass(); clazz != null; clazz = 
clazz.superclass() )
                {
  -                     ExecutableMemberDoc member = extractExecutableMemberDoc( 
clazz, memberName, for_type );
  +                     XExecutableMember member = extractXExecutableMember( clazz, 
memberName, for_type );
   
                        if( member != null )
                                return member;
  @@ -385,9 +340,9 @@
                String skip_exceptions = attributes.getProperty( "skip" );
                String append_exceptions = attributes.getProperty( "append" );
                String member_name = null;
  -             ClassDoc[] exceptions = null;
  +             XClass[] exceptions = null;
   
  -             ExecutableMemberDoc executableMember = null;
  +             XExecutableMember executableMember = null;
   
                switch ( for_type )
                {
  @@ -410,7 +365,7 @@
                        exceptions = executableMember.thrownExceptions();
                else
                {
  -                     executableMember = getExecutableMemberDocForMemberName( 
member_name, true, for_type );
  +                     executableMember = getXExecutableMemberForMemberName( 
member_name, true, for_type );
   
                        //no member with the specified name found in class
                        if( executableMember == null )
  @@ -491,7 +446,7 @@
   
        protected void forAllMemberTags( String template, Properties attributes, int 
for_type, String resourceKey, String[] arguments ) throws XDocletException
        {
  -             MemberDoc member = null;
  +             XMember member = null;
   
                switch ( for_type )
                {
  @@ -511,7 +466,7 @@
                if( member == null )
                        throw new XDocletException( Translator.getString( resourceKey, 
arguments ) );
   
  -             Tag[] tags = DocletUtil.getTagsByName( member, attributes.getProperty( 
"tagName" ) );
  +             XTag[] tags = member.doc().tags( attributes.getProperty( "tagName" ) );
   
                for( int i = 0; i < tags.length; i++ )
                {
  @@ -528,11 +483,15 @@
                setCurrentTag( null );
        }
   
  +     /**
  +      * @todo make static and move to DocletUtil. This is a utility method, since 
no class
  +      * members are accessed
  +      */
        protected String memberComment( Properties attributes, int for_type ) throws 
XDocletException
        {
                String no_comment_signs = attributes.getProperty( "no-comment-signs" );
   
  -             MemberDoc member = null;
  +             XMember member = null;
   
                switch ( for_type )
                {
  @@ -551,18 +510,18 @@
   
                if( no_comment_signs != null && no_comment_signs.equalsIgnoreCase( 
"true" ) )
                {
  -                     return member.commentText();
  +                     return member.doc().commentText();
                }
   
                char[] spaces = getIndentChars( attributes );
  -             Tag[] member_tags = member.tags();
  +             XTag[] member_tags = member.doc().tags();
   
                if( member_tags.length > 0 )
                {
                        StringBuffer result = new StringBuffer();
   
                        //add user comments
  -                     StringTokenizer st = new StringTokenizer( 
member.commentText().trim(), "\n", false );
  +                     StringTokenizer st = new StringTokenizer( 
member.doc().commentText().trim(), "\n", false );
   
                        if( st.countTokens() > 0 )
                        {
  @@ -582,7 +541,7 @@
                                        {
                                                result.append( spaces ).append( " * " )
                                                        .append( member_tags[i].name() 
).append( ' ' )
  -                                                     .append( member_tags[i].text() 
);
  +                                                     .append( 
member_tags[i].value() );
   
                                                //for all lines but not the last line
                                                if( i < member_tags.length - 1 )
  @@ -599,17 +558,26 @@
                        return "";
        }
   
  +     protected String firstSentenceDescriptionOfCurrentMember( XMember member ) 
throws XDocletException
  +     {
  +             return member.doc().firstSentence() != null ? 
member.doc().firstSentence() : "";
  +     }
  +
  +     /**
  +      * @todo the already Set contains XMember objects. equals/hashCode should be 
defined in XMember and be implemented
  +      * in all of the implementing classes.
  +      */
        protected void forAllMembers( String template, Properties attributes, int 
for_type ) throws XDocletException
        {
                boolean superclasses = TypeConversionUtil.stringToBoolean( 
attributes.getProperty( "superclasses" ), true );
                boolean sort = TypeConversionUtil.stringToBoolean( 
attributes.getProperty( "sort" ), true );
   
  -             ClassDoc cur_class = getCurrentClass();
  +             XClass cur_class = getCurrentClass();
                HashSet already = new HashSet();
   
                do
                {
  -                     MemberDoc[] members = null;
  +                     XMember[] members = null;
   
                        switch ( for_type )
                        {
  @@ -638,20 +606,20 @@
                                // otherwisee (most cases), follow these rules:
                                // a) if superclasses == true -> handle it anyway
                                // b) if superclasses == false -> only handle it if 
it's defined in the current class
  -                             if( ( superclasses || ( !superclasses && 
members[j].containingClass() == cur_class ) ) && !"<clinit>".equals( members[j].name() 
) )
  +                             if( ( superclasses || ( !superclasses && 
members[j].containingClass().equals( cur_class ) ) ) && !"<clinit>".equals( 
members[j].name() ) )
                                {
                                        if( already.contains( members[j] ) == false )
                                        {
                                                switch ( for_type )
                                                {
                                                case FOR_FIELD:
  -                                                     setCurrentField( ( FieldDoc ) 
members[j] );
  +                                                     setCurrentField( ( XField ) 
members[j] );
                                                        break;
                                                case FOR_CONSTRUCTOR:
  -                                                     setCurrentConstructor( ( 
ConstructorDoc ) members[j] );
  +                                                     setCurrentConstructor( ( 
XConstructor ) members[j] );
                                                        break;
                                                case FOR_METHOD:
  -                                                     setCurrentMethod( ( MethodDoc 
) members[j] );
  +                                                     setCurrentMethod( ( XMethod ) 
members[j] );
                                                        break;
                                                default:
                                                        throw new XDocletException( 
"Bad type: " + for_type );
  @@ -671,44 +639,6 @@
        }
   
        /**
  -      * A utility method used by ifHasClassTag/ifDoesntHaveClassTag and
  -      * ifHasMethodTag/ifDoesntHaveMethodTag, return true if at least one tag exists
  -      * with the specified name.
  -      *
  -      * @param template              The body of the block tag
  -      * @param attributes            The attributes of the template tag
  -      * @param for_type
  -      * @return                      Description of the Returned Value
  -      * @exception XDocletException  Description of Exception
  -      */
  -     protected boolean ifHasTag_Impl( String template, Properties attributes, int 
for_type ) throws XDocletException
  -     {
  -             String tag_name = attributes.getProperty( "tagName" );
  -             String param_name = attributes.getProperty( "paramName" );
  -             String param_num = attributes.getProperty( "paramNum" );
  -             String superClassesStr = attributes.getProperty( "superclasses" );
  -             boolean superClasses = TypeConversionUtil.stringToBoolean( 
superClassesStr, true );
  -             int param_int = -1;
  -
  -             if( param_num != null )
  -                     param_int = Integer.valueOf( param_num ).intValue();
  -
  -             switch ( for_type )
  -             {
  -             case FOR_METHOD:
  -                     return null != getMethodTagValue( getCurrentMethod(), 
tag_name, param_name, param_int, null, null, false );
  -             case FOR_CLASS:
  -                     return null != getClassTagValue( getCurrentClass(), tag_name, 
param_name, param_int, null, null, superClasses, false );
  -             case FOR_CONSTRUCTOR:
  -                     return null != getConstructorTagValue( 
getCurrentConstructor(), tag_name, param_name, param_int, null, null, false );
  -             case FOR_FIELD:
  -                     return null != getFieldTagValue( getCurrentField(), tag_name, 
param_name, param_int, null, null, false );
  -             default:
  -                     throw new XDocletException( Translator.getString( 
"bad_for_type" ) );
  -             }
  -     }
  -
  -     /**
         * A utility method used by firstSentenceDescription to replace end of line by
         * space.
         *
  @@ -764,9 +694,9 @@
                }
        }
   
  -     private ExecutableMemberDoc extractExecutableMemberDoc( ClassDoc clazz, String 
memberName, int for_type ) throws XDocletException
  +     private XExecutableMember extractXExecutableMember( XClass clazz, String 
memberName, int for_type ) throws XDocletException
        {
  -             ExecutableMemberDoc[] executableMembers;
  +             XExecutableMember[] executableMembers;
   
                switch ( for_type )
                {
  
  
  

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

Reply via email to