Update of /cvsroot/xdoclet/xdoclet2/src/java/xdoclet/sdk/ant
In directory sc8-pr-cvs1:/tmp/cvs-serv23313/src/java/xdoclet/sdk/ant

Modified Files:
        AntDocletTask.java AntTaskPredicate.java AntUtil.java 
        PropertyMethodPredicate.java TaskXmlPlugin.java 
Log Message:
- Applied formatting with Jalopy.
- Added our own Jalopy and Checkstyle settings.
- Added custom tag definitions to keep JavaDoc silent about custom tags.

Index: AntDocletTask.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet2/src/java/xdoclet/sdk/ant/AntDocletTask.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** AntDocletTask.java  27 Feb 2003 00:13:02 -0000      1.1.1.1
--- AntDocletTask.java  5 Mar 2003 22:27:10 -0000       1.2
***************
*** 1,6 ****
  package xdoclet.sdk.ant;
  
- import xdoclet.ant.XDocletTask;
  import xdoclet.XDoclet;
  
  /**
--- 1,6 ----
  package xdoclet.sdk.ant;
  
  import xdoclet.XDoclet;
+ import xdoclet.ant.XDocletTask;
  
  /**

Index: AntTaskPredicate.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet2/src/java/xdoclet/sdk/ant/AntTaskPredicate.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** AntTaskPredicate.java       5 Mar 2003 00:32:38 -0000       1.2
--- AntTaskPredicate.java       5 Mar 2003 22:27:10 -0000       1.3
***************
*** 1,9 ****
  package xdoclet.sdk.ant;
  
! import xjavadoc.XMethod;
! import xjavadoc.XClass;
  
  import xdoclet.util.TypeConversionUtil;
! import org.apache.commons.collections.Predicate;
  
  /**
--- 1,10 ----
  package xdoclet.sdk.ant;
  
! import org.apache.commons.collections.Predicate;
  
  import xdoclet.util.TypeConversionUtil;
! 
! import xjavadoc.XClass;
! import xjavadoc.XMethod;
  
  /**
***************
*** 19,25 ****
       * @return true if o is a class and represents an Ant task.
       */
!     public boolean evaluate(Object o)
!     {
          XClass clazz = (XClass) o;
          if (clazz.isAbstract()) {
              return false;
--- 20,26 ----
       * @return true if o is a class and represents an Ant task.
       */
!     public boolean evaluate(Object o) {
          XClass clazz = (XClass) o;
+ 
          if (clazz.isAbstract()) {
              return false;
***************
*** 59,64 ****
       * @return
       */
!     private static boolean hasExecuteMethod(XClass clazz)
!     {
          if (clazz == null) {
              return false;
--- 60,64 ----
       * @return
       */
!     private static boolean hasExecuteMethod(XClass clazz) {
          if (clazz == null) {
              return false;
***************
*** 67,74 ****
          // It ain't a task if we've climbed back to Task itself.
          // Also ignore other special Ant classes
!         if ("org.apache.tools.ant.Task".equals(clazz.getQualifiedName()) ||
!             "org.apache.tools.ant.Target".equals(clazz.getQualifiedName()) ||
!             "org.apache.tools.ant.TaskAdapter".equals(clazz.getQualifiedName()) ||
!             "org.apache.tools.ant.UnknownElement".equals(clazz.getQualifiedName())) {
              return false;
          }
--- 67,74 ----
          // It ain't a task if we've climbed back to Task itself.
          // Also ignore other special Ant classes
!         if ("org.apache.tools.ant.Task".equals(clazz.getQualifiedName())
!             || "org.apache.tools.ant.Target".equals(clazz.getQualifiedName())
!             || "org.apache.tools.ant.TaskAdapter".equals(clazz.getQualifiedName())
!             || 
"org.apache.tools.ant.UnknownElement".equals(clazz.getQualifiedName())) {
              return false;
          }
***************
*** 76,80 ****
          // need to check that only runtime exceptions are thrown?
          XMethod method = clazz.getMethod("execute()", true);
!         if (method != null && method.getReturnType().getName().equals("void")) {
              return true;
          }
--- 76,81 ----
          // need to check that only runtime exceptions are thrown?
          XMethod method = clazz.getMethod("execute()", true);
! 
!         if ((method != null) && method.getReturnType().getName().equals("void")) {
              return true;
          }
***************
*** 82,85 ****
          return false;
      }
- 
  }
--- 83,85 ----

Index: AntUtil.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet2/src/java/xdoclet/sdk/ant/AntUtil.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** AntUtil.java        5 Mar 2003 00:32:38 -0000       1.2
--- AntUtil.java        5 Mar 2003 22:27:10 -0000       1.3
***************
*** 1,12 ****
  package xdoclet.sdk.ant;
  
  import xjavadoc.*;
  
  import java.util.*;
  
- import xdoclet.XDocletException;
- import org.apache.tools.ant.IntrospectionHelper;
- import org.apache.tools.ant.types.EnumeratedAttribute;
- 
  /**
   *
--- 1,13 ----
  package xdoclet.sdk.ant;
  
+ import org.apache.tools.ant.IntrospectionHelper;
+ import org.apache.tools.ant.types.EnumeratedAttribute;
+ 
+ import xdoclet.XDocletException;
+ 
  import xjavadoc.*;
  
  import java.util.*;
  
  /**
   *
***************
*** 15,28 ****
   */
  public class AntUtil {
- 
      /**
       * Default category for tasks without a category attribute.
       */
      public final static String DEFAULT_CATEGORY = "other";
- 
      private static Map attributeDisplayMap = new HashMap();
      private static Map elementDisplayMap = new HashMap();
! 
!     private static String[] fluffPrefixes = {"set a", "set the", "sets a", "sets 
the"};
  
      static {
--- 16,26 ----
   */
  public class AntUtil {
      /**
       * Default category for tasks without a category attribute.
       */
      public final static String DEFAULT_CATEGORY = "other";
      private static Map attributeDisplayMap = new HashMap();
      private static Map elementDisplayMap = new HashMap();
!     private static String[] fluffPrefixes = { "set a", "set the", "sets a", "sets 
the" };
  
      static {
***************
*** 63,68 ****
       * @exception XDocletException
       */
!     public final static String getTaskName(XClass clazz) throws XDocletException
!     {
          String tagValue = clazz.getDoc().getTagAttributeValue("ant.task", "name");
  
--- 61,66 ----
       * @exception XDocletException
       */
!     public final static String getTaskName(XClass clazz)
!         throws XDocletException {
          String tagValue = clazz.getDoc().getTagAttributeValue("ant.task", "name");
  
***************
*** 77,80 ****
--- 75,79 ----
              tagValue = tagValue.toLowerCase();
          }
+ 
          return tagValue;
      }
***************
*** 87,100 ****
       * @exception XDocletException
       */
!     public final static String getCategoryName(XClass clazz) throws XDocletException
!     {
          String tagValue = clazz.getDoc().getTagAttributeValue("ant.task", 
"category");
  
          if (tagValue != null) {
              tagValue = tagValue.toLowerCase();
!         }
!         else {
              tagValue = DEFAULT_CATEGORY;
          }
          return tagValue;
      }
--- 86,99 ----
       * @exception XDocletException
       */
!     public final static String getCategoryName(XClass clazz)
!         throws XDocletException {
          String tagValue = clazz.getDoc().getTagAttributeValue("ant.task", 
"category");
  
          if (tagValue != null) {
              tagValue = tagValue.toLowerCase();
!         } else {
              tagValue = DEFAULT_CATEGORY;
          }
+ 
          return tagValue;
      }
***************
*** 106,111 ****
       * @exception XDocletException
       */
!     public String elementName(XMethod method) throws XDocletException
!     {
          String methodName = method.getName();
          String elementName = "<not a valid element>";
--- 105,110 ----
       * @exception XDocletException
       */
!     public String elementName(XMethod method)
!         throws XDocletException {
          String methodName = method.getName();
          String elementName = "<not a valid element>";
***************
*** 113,128 ****
          if (methodName.startsWith("addConfigured")) {
              elementName = methodName.substring(13, methodName.length());
!         }
!         else if (methodName.startsWith("add")) {
              elementName = methodName.substring(3, methodName.length());
!         }
!         else if (methodName.startsWith("create")) {
              elementName = methodName.substring(6, methodName.length());
          }
          return elementName.toLowerCase();
      }
  
!     public String displayAttributeType(XMethod method) throws XDocletException
!     {
          Collection parameters = method.getParameters();
          XParameter param = XCollections.parameterIterator(parameters).next();
--- 112,126 ----
          if (methodName.startsWith("addConfigured")) {
              elementName = methodName.substring(13, methodName.length());
!         } else if (methodName.startsWith("add")) {
              elementName = methodName.substring(3, methodName.length());
!         } else if (methodName.startsWith("create")) {
              elementName = methodName.substring(6, methodName.length());
          }
+ 
          return elementName.toLowerCase();
      }
  
!     public String displayAttributeType(XMethod method)
!         throws XDocletException {
          Collection parameters = method.getParameters();
          XParameter param = XCollections.parameterIterator(parameters).next();
***************
*** 132,136 ****
  
          if (display == null) {
- 
              Class clazz = getAttributeClass(methodType);
  
--- 130,133 ----
***************
*** 143,163 ****
              try {
                  instance = clazz.newInstance();
!             }
!             catch (InstantiationException e) {
!             }
!             catch (IllegalAccessException e) {
              }
  
!             if (instance != null && instance instanceof EnumeratedAttribute) {
                  EnumeratedAttribute enum = (EnumeratedAttribute) instance;
                  String[] values = enum.getValues();
  
                  display = "";
                  for (int i = 0; i < values.length; i++) {
!                     display += "&quot;" + values[i] + "&quot;";
                      if (i != (values.length - 1)) {
                          display += ", ";
                      }
                  }
                  return display;
              }
--- 140,161 ----
              try {
                  instance = clazz.newInstance();
!             } catch (InstantiationException e) {
!             } catch (IllegalAccessException e) {
              }
  
!             if ((instance != null) && instance instanceof EnumeratedAttribute) {
                  EnumeratedAttribute enum = (EnumeratedAttribute) instance;
                  String[] values = enum.getValues();
  
                  display = "";
+ 
                  for (int i = 0; i < values.length; i++) {
!                     display += ("&quot;" + values[i] + "&quot;");
! 
                      if (i != (values.length - 1)) {
                          display += ", ";
                      }
                  }
+ 
                  return display;
              }
***************
*** 165,173 ****
              display = "";
          }
          return display;
      }
  
!     public String displayElementType() throws XDocletException
!     {
          String elementType = elementType();
          String display = (String) elementDisplayMap.get(elementType);
--- 163,172 ----
              display = "";
          }
+ 
          return display;
      }
  
!     public String displayElementType()
!         throws XDocletException {
          String elementType = elementType();
          String display = (String) elementDisplayMap.get(elementType);
***************
*** 176,179 ****
--- 175,179 ----
              display = "";
          }
+ 
          return display;
      }
***************
*** 185,190 ****
       * @exception XDocletException
       */
!     public String elementType() throws XDocletException
!     {
          XClass clazz = elementClassDoc();
  
--- 185,190 ----
       * @exception XDocletException
       */
!     public String elementType()
!         throws XDocletException {
          XClass clazz = elementClassDoc();
  
***************
*** 192,203 ****
              throw new XDocletException("Method is not an Ant element!");
          }
          return clazz.getQualifiedName();
      }
  
!     public String shortMethodDescription(XMethod method) throws XDocletException
!     {
          String desc = method.getDoc().getFirstSentence();
  
!         if (desc == null || desc.length() == 0) {
              desc = "no description";
          }
--- 192,204 ----
              throw new XDocletException("Method is not an Ant element!");
          }
+ 
          return clazz.getQualifiedName();
      }
  
!     public String shortMethodDescription(XMethod method)
!         throws XDocletException {
          String desc = method.getDoc().getFirstSentence();
  
!         if ((desc == null) || (desc.length() == 0)) {
              desc = "no description";
          }
***************
*** 212,215 ****
--- 213,217 ----
              if (descLower.startsWith(prefix)) {
                  desc = desc.substring(prefix.length());
+ 
                  break;
              }
***************
*** 225,238 ****
      }
  
!     private Class getAttributeClass(String type) throws XDocletException
!     {
! //        System.out.println("type = " + type);
! 
          Class clazz = null;
  
          try {
              clazz = Class.forName(type);
!         }
!         catch (ClassNotFoundException e) {
              int lastDotPosition = type.lastIndexOf('.');
  
--- 227,238 ----
      }
  
!     private Class getAttributeClass(String type)
!         throws XDocletException {
!         //        System.out.println("type = " + type);
          Class clazz = null;
  
          try {
              clazz = Class.forName(type);
!         } catch (ClassNotFoundException e) {
              int lastDotPosition = type.lastIndexOf('.');
  
***************
*** 241,256 ****
                  return null;
              }
              type = type.substring(0, lastDotPosition) + "$" + 
type.substring(lastDotPosition + 1);
              try {
                  clazz = Class.forName(type);
!             }
!             catch (ClassNotFoundException e1) {
                  throw new XDocletException(e1.getMessage());
              }
          }
          return clazz;
      }
  
- 
      /**
       * @param cur_class
--- 241,257 ----
                  return null;
              }
+ 
              type = type.substring(0, lastDotPosition) + "$" + 
type.substring(lastDotPosition + 1);
+ 
              try {
                  clazz = Class.forName(type);
!             } catch (ClassNotFoundException e1) {
                  throw new XDocletException(e1.getMessage());
              }
          }
+ 
          return clazz;
      }
  
      /**
       * @param cur_class
***************
*** 259,264 ****
       * @todo                        refactor to cache methods per class, and save 
some time
       */
!     private XMethod[] getAttributeMethods(XClass cur_class) throws XDocletException
!     {
          // Use Ant's own introspection mechanism to gather the
          // attributes this class supports
--- 260,265 ----
       * @todo                        refactor to cache methods per class, and save 
some time
       */
!     private XMethod[] getAttributeMethods(XClass cur_class)
!         throws XDocletException {
          // Use Ant's own introspection mechanism to gather the
          // attributes this class supports
***************
*** 267,272 ****
          try {
              is = 
IntrospectionHelper.getHelper(Class.forName(cur_class.getQualifiedName()));
!         }
!         catch (ClassNotFoundException e) {
              throw new XDocletException(e);
          }
--- 268,272 ----
          try {
              is = 
IntrospectionHelper.getHelper(Class.forName(cur_class.getQualifiedName()));
!         } catch (ClassNotFoundException e) {
              throw new XDocletException(e);
          }
***************
*** 282,286 ****
  
              attributeTypeMap.setProperty(name, type.getName());
! //            System.out.println(name + " = " + type.getName());
          }
  
--- 282,287 ----
  
              attributeTypeMap.setProperty(name, type.getName());
! 
!             //            System.out.println(name + " = " + type.getName());
          }
  
***************
*** 289,294 ****
          XMethod[] allMethods = getMethods(cur_class);
  
! //        System.out.println("allMethods = " + allMethods.length);
! 
          // And now filter the methods based
          // on what IntrospectionHelper says
--- 290,294 ----
          XMethod[] allMethods = getMethods(cur_class);
  
!         //        System.out.println("allMethods = " + allMethods.length);
          // And now filter the methods based
          // on what IntrospectionHelper says
***************
*** 299,304 ****
              String methodName = method.getName();
  
! //            System.out.println("methodName = " + methodName);
! 
              if (!methodName.startsWith("set")) {
                  continue;
--- 299,303 ----
              String methodName = method.getName();
  
!             //            System.out.println("methodName = " + methodName);
              if (!methodName.startsWith("set")) {
                  continue;
***************
*** 307,320 ****
              String attributeName = methodName.substring(3).toLowerCase();
  
! //            System.out.println("attributeName = " + attributeName);
! 
              if ((method.getParameters().size() != 1) || (!method.isPublic())) {
                  continue;
              }
  
!             String attributeType = 
XCollections.parameterIterator(method.getParameters()).next().getType().getQualifiedName();
! 
! //            System.out.println("attributeType = " + attributeType);
  
              String mapAttribute = attributeTypeMap.getProperty(attributeName);
  
--- 306,318 ----
              String attributeName = methodName.substring(3).toLowerCase();
  
!             //            System.out.println("attributeName = " + attributeName);
              if ((method.getParameters().size() != 1) || (!method.isPublic())) {
                  continue;
              }
  
!             String attributeType = 
XCollections.parameterIterator(method.getParameters()).next().getType()
!                                                .getQualifiedName();
  
+             //            System.out.println("attributeType = " + attributeType);
              String mapAttribute = attributeTypeMap.getProperty(attributeName);
  
***************
*** 329,334 ****
              }
  
! //            System.out.println(methodName + " : " + attributeName + " : " + 
attributeType);
! 
              attributeMethods.add(method);
          }
--- 327,331 ----
              }
  
!             //            System.out.println(methodName + " : " + attributeName + " 
: " + attributeType);
              attributeMethods.add(method);
          }
***************
*** 345,350 ****
       * @todo                        add DynamicConfigurator (this should be noted in 
the template, not dealt with here)
       */
!     private XMethod[] getElementMethods(XClass cur_class) throws XDocletException
!     {
          // Use Ant's own introspection mechanism to gather the
          // elements this class supports
--- 342,347 ----
       * @todo                        add DynamicConfigurator (this should be noted in 
the template, not dealt with here)
       */
!     private XMethod[] getElementMethods(XClass cur_class)
!         throws XDocletException {
          // Use Ant's own introspection mechanism to gather the
          // elements this class supports
***************
*** 353,358 ****
          try {
              is = 
IntrospectionHelper.getHelper(Class.forName(cur_class.getQualifiedName()));
!         }
!         catch (ClassNotFoundException e) {
              throw new XDocletException(e.getMessage());
          }
--- 350,354 ----
          try {
              is = 
IntrospectionHelper.getHelper(Class.forName(cur_class.getQualifiedName()));
!         } catch (ClassNotFoundException e) {
              throw new XDocletException(e.getMessage());
          }
***************
*** 368,372 ****
  
              elementTypeMap.setProperty(name, type.getName());
! //            System.out.println(name + " = " + type.getName());
          }
  
--- 364,369 ----
  
              elementTypeMap.setProperty(name, type.getName());
! 
!             //            System.out.println(name + " = " + type.getName());
          }
  
***************
*** 408,413 ****
              }
  
! //            System.out.println("elementName = " + elementName);
! 
              String elementType = null;
  
--- 405,409 ----
              }
  
!             //            System.out.println("elementName = " + elementName);
              String elementType = null;
  
***************
*** 416,422 ****
                      continue;
                  }
                  elementType = 
XCollections.parameterIterator(method.getParameters()).next().getType().getQualifiedName();
!             }
!             else {
                  elementType = method.getReturnType().getQualifiedName();
              }
--- 412,418 ----
                      continue;
                  }
+ 
                  elementType = 
XCollections.parameterIterator(method.getParameters()).next().getType().getQualifiedName();
!             } else {
                  elementType = method.getReturnType().getQualifiedName();
              }
***************
*** 428,432 ****
              String mapElementType = elementTypeMap.getProperty(elementName);
  
! //            System.out.println("elementType = " + elementType + " mapElementType = 
" + mapElementType);
              if (mapElementType == null) {
                  continue;
--- 424,428 ----
              String mapElementType = elementTypeMap.getProperty(elementName);
  
!             //            System.out.println("elementType = " + elementType + " 
mapElementType = " + mapElementType);
              if (mapElementType == null) {
                  continue;
***************
*** 453,458 ****
       * @exception XDocletException
       */
!     private XMethod[] getMethods(XClass cur_class) throws XDocletException
!     {
          Map already = new HashMap();
  
--- 449,454 ----
       * @exception XDocletException
       */
!     private XMethod[] getMethods(XClass cur_class)
!         throws XDocletException {
          Map already = new HashMap();
  
***************
*** 462,467 ****
              // hardcoded to stop when it hits Task, nothing there
              // or above that needs to be processed
!             if (cur_class.getQualifiedName().equals("org.apache.tools.ant.Task") ||
!                 
cur_class.getQualifiedName().equals("org.apache.tools.ant.taskdefs.MatchingTask")) {
                  break;
              }
--- 458,463 ----
              // hardcoded to stop when it hits Task, nothing there
              // or above that needs to be processed
!             if (cur_class.getQualifiedName().equals("org.apache.tools.ant.Task")
!                 || 
cur_class.getQualifiedName().equals("org.apache.tools.ant.taskdefs.MatchingTask")) {
                  break;
              }
***************
*** 477,480 ****
--- 473,477 ----
                      continue;
                  }
+ 
                  if (shouldIgnore(method)) {
                      continue;
***************
*** 483,488 ****
                  String methodName = method.getName();
  
! //                System.out.println("method = " + method + ":" + methodName);
! 
                  if (method.getContainingClass() == cur_class) {
                      if (already.containsKey(methodName) == false) {
--- 480,484 ----
                  String methodName = method.getName();
  
!                 //                System.out.println("method = " + method + ":" + 
methodName);
                  if (method.getContainingClass() == cur_class) {
                      if (already.containsKey(methodName) == false) {
***************
*** 499,504 ****
      }
  
!     private boolean isDeprecated(XMethod method)
!     {
          Collection tags = method.getDoc().getTags();
          Iterator iter = tags.iterator();
--- 495,499 ----
      }
  
!     private boolean isDeprecated(XMethod method) {
          Collection tags = method.getDoc().getTags();
          Iterator iter = tags.iterator();
***************
*** 511,514 ****
--- 506,510 ----
              }
          }
+ 
          return false;
      }
***************
*** 519,525 ****
       * @return
       */
!     private XClass elementClassDoc()
!     {
          XClass clazz = null;
          /*
          String methodName = getCurrentMethod().getName();
--- 515,521 ----
       * @return
       */
!     private XClass elementClassDoc() {
          XClass clazz = null;
+ 
          /*
          String methodName = getCurrentMethod().getName();
***************
*** 537,541 ****
              }
          }
! //        System.out.println(methodName + ": clazz = " + clazz.getQualifiedName());
          */
          return clazz;
--- 533,537 ----
              }
          }
!         //        System.out.println(methodName + ": clazz = " + 
clazz.getQualifiedName());
          */
          return clazz;
***************
*** 549,554 ****
       * @exception XDocletException
       */
!     private boolean shouldIgnore(XMethod method) throws XDocletException
!     {
          String value = method.getDoc().getTagAttributeValue("ant.attribute", 
"ignore");
  
--- 545,550 ----
       * @exception XDocletException
       */
!     private boolean shouldIgnore(XMethod method)
!         throws XDocletException {
          String value = method.getDoc().getTagAttributeValue("ant.attribute", 
"ignore");
  
***************
*** 558,575 ****
  
          value = method.getDoc().getTagAttributeValue("ant.element", "ignore");
          if ("true".equals(value)) {
              return true;
          }
          return false;
      }
  
!     private XMethod[] sortMethods(List methods)
!     {
          //sort methods
          Collections.sort(methods,
!             new Comparator()
!             {
!                 public int compare(Object o1, Object o2)
!                 {
                      XMethod m1 = (XMethod) o1;
                      XMethod m2 = (XMethod) o2;
--- 554,570 ----
  
          value = method.getDoc().getTagAttributeValue("ant.element", "ignore");
+ 
          if ("true".equals(value)) {
              return true;
          }
+ 
          return false;
      }
  
!     private XMethod[] sortMethods(List methods) {
          //sort methods
          Collections.sort(methods,
!             new Comparator() {
!                 public int compare(Object o1, Object o2) {
                      XMethod m1 = (XMethod) o1;
                      XMethod m2 = (XMethod) o2;
***************
*** 578,584 ****
                  }
  
! 
!                 public boolean equals(Object obj)
!                 {
                      //dumb
                      return obj == this;
--- 573,577 ----
                  }
  
!                 public boolean equals(Object obj) {
                      //dumb
                      return obj == this;

Index: PropertyMethodPredicate.java
===================================================================
RCS file: 
/cvsroot/xdoclet/xdoclet2/src/java/xdoclet/sdk/ant/PropertyMethodPredicate.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** PropertyMethodPredicate.java        27 Feb 2003 00:13:03 -0000      1.1.1.1
--- PropertyMethodPredicate.java        5 Mar 2003 22:27:10 -0000       1.2
***************
*** 1,15 ****
  package xdoclet.sdk.ant;
  
- import xjavadoc.XMethod;
- import xjavadoc.XClass;
- 
- import xdoclet.util.TypeConversionUtil;
- import xdoclet.XDocletException;
  import org.apache.commons.collections.Predicate;
  import org.apache.tools.ant.IntrospectionHelper;
  
! import java.util.Map;
! import java.util.HashMap;
  import java.util.Enumeration;
  
  /**
--- 1,16 ----
  package xdoclet.sdk.ant;
  
  import org.apache.commons.collections.Predicate;
  import org.apache.tools.ant.IntrospectionHelper;
  
! import xdoclet.XDocletException;
! import xdoclet.util.TypeConversionUtil;
! 
! import xjavadoc.XClass;
! import xjavadoc.XMethod;
! 
  import java.util.Enumeration;
+ import java.util.HashMap;
+ import java.util.Map;
  
  /**
***************
*** 20,28 ****
   */
  public class PropertyMethodPredicate implements Predicate {
- 
      private Map _attributeTypeMap = new HashMap();
      private IntrospectionHelper _introspectionHelper = null;
  
!     public PropertyMethodPredicate(XClass clazz) throws XDocletException {
          try {
              _introspectionHelper = 
IntrospectionHelper.getHelper(Class.forName(clazz.getQualifiedName()));
--- 21,29 ----
   */
  public class PropertyMethodPredicate implements Predicate {
      private Map _attributeTypeMap = new HashMap();
      private IntrospectionHelper _introspectionHelper = null;
  
!     public PropertyMethodPredicate(XClass clazz)
!         throws XDocletException {
          try {
              _introspectionHelper = 
IntrospectionHelper.getHelper(Class.forName(clazz.getQualifiedName()));
***************
*** 31,34 ****
--- 32,36 ----
              // doesn't give us the whole data structure directly
              Enumeration enum = _introspectionHelper.getAttributes();
+ 
              while (enum.hasMoreElements()) {
                  String name = (String) enum.nextElement();
***************
*** 37,43 ****
                  _attributeTypeMap.put(name, type.getName());
              }
! 
!         }
!         catch (ClassNotFoundException e) {
              throw new XDocletException("The compiled classes must be on the 
classpath", e);
          }
--- 39,43 ----
                  _attributeTypeMap.put(name, type.getName());
              }
!         } catch (ClassNotFoundException e) {
              throw new XDocletException("The compiled classes must be on the 
classpath", e);
          }
***************
*** 47,53 ****
       * Returns true if the method is a property method.
       */
!     public boolean evaluate(Object o)
!     {
          XMethod method = (XMethod) o;
          return false;
      }
--- 47,53 ----
       * Returns true if the method is a property method.
       */
!     public boolean evaluate(Object o) {
          XMethod method = (XMethod) o;
+ 
          return false;
      }

Index: TaskXmlPlugin.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet2/src/java/xdoclet/sdk/ant/TaskXmlPlugin.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** TaskXmlPlugin.java  27 Feb 2003 00:13:03 -0000      1.1.1.1
--- TaskXmlPlugin.java  5 Mar 2003 22:27:11 -0000       1.2
***************
*** 9,14 ****
   */
  public class TaskXmlPlugin extends VelocityPlugin {
!     public TaskXmlPlugin()
!     {
          // We accept all classes that are subclasses of xdoclet.Plugin
          createAccept().setPredicate(new AntTaskPredicate());
--- 9,13 ----
   */
  public class TaskXmlPlugin extends VelocityPlugin {
!     public TaskXmlPlugin() {
          // We accept all classes that are subclasses of xdoclet.Plugin
          createAccept().setPredicate(new AntTaskPredicate());



-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to