Update of /cvsroot/xdoclet/xdoclet/modules/hibernate/src/xdoclet/modules/hibernate
In directory sc8-pr-cvs1:/tmp/cvs-serv29967

Modified Files:
        HibernateTagsHandler.java 
Log Message:
close the <column/> element correctly
fix an NPE that was reported in Hibernate forum
renamed forAllClasses to forAllSubclasses

Index: HibernateTagsHandler.java
===================================================================
RCS file: 
/cvsroot/xdoclet/xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/HibernateTagsHandler.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** HibernateTagsHandler.java   13 Mar 2003 22:12:07 -0000      1.12
--- HibernateTagsHandler.java   15 Mar 2003 05:43:08 -0000      1.13
***************
*** 236,241 ****
  
      /**
!      * Iterates over all classes loaded by javadoc and evaluates the body of the tag 
for each class. It discards classes
!      * that have an xdoclet-generated class tag defined.
       *
       * @param template              The body of the block tag
--- 236,241 ----
  
      /**
!      * Iterates over all classes loaded by javadoc that are direct subclasses of the 
current class and evaluates the
!      * body of the tag for each class. It discards classes that have an 
xdoclet-generated class tag defined.
       *
       * @param template              The body of the block tag
***************
*** 243,267 ****
       * @exception XDocletException  Description of Exception
       * @doc.tag                     type="block"
-      * @doc.param                   name="abstract" optional="true" 
values="true,false" description="If true then accept
-      *      abstract classes also; otherwise don't."
-      * @doc.param                   name="type" optional="false" description="For 
all classes that are extends by the
-      *      type."
       */
! 
!     public void forAllClasses(String template, Properties attributes) throws 
XDocletException
      {
  
!         Log log = LogUtil.getLog(HibernateTagsHandler.class, "forAllClasses");
  
          try {
  
!             String abstractStr = attributes.getProperty("abstract");
!             boolean acceptAbstractClasses = 
TypeConversionUtil.stringToBoolean(abstractStr, true);
!             String typeName = attributes.getProperty("type");
  
!             if (log.isDebugEnabled()) {
!                 log.debug("acceptAbstractClasses=" + acceptAbstractClasses);
                  log.debug("typeName=" + typeName);
-             }
  
              Collection classes = ClassTagsHandler.getAllClasses();
--- 243,258 ----
       * @exception XDocletException  Description of Exception
       * @doc.tag                     type="block"
       */
!     public void forAllSubclasses(String template, Properties attributes) throws 
XDocletException
      {
  
!         Log log = LogUtil.getLog(HibernateTagsHandler.class, "forAllSubclasses");
  
          try {
  
!             String typeName = getCurrentClass().getQualifiedName();
  
!             if (log.isDebugEnabled())
                  log.debug("typeName=" + typeName);
  
              Collection classes = ClassTagsHandler.getAllClasses();
***************
*** 272,280 ****
                  log.debug("clazz=" + clazz);
  
!                 if (DocletSupport.isDocletGenerated(clazz) || (clazz.isAbstract() && 
acceptAbstractClasses == false)) {
!                     log.debug("isDocletGenerated or isAbstract");
                  }
!                 else if (clazz.getSuperclass().getQualifiedName().equals(typeName)) {
!                     log.debug("isOfType true, generate().");
  
                      XClass current = getCurrentClass();
--- 263,271 ----
                  log.debug("clazz=" + clazz);
  
!                 if (DocletSupport.isDocletGenerated(clazz)) {
!                     log.debug("isDocletGenerated");
                  }
!                 else if (clazz.getSuperclass() != null && 
clazz.getSuperclass().getQualifiedName().equals(typeName)) {
!                     log.debug("is a subclass");
  
                      XClass current = getCurrentClass();
***************
*** 289,293 ****
                  }
                  else {
!                     log.debug("isOfType false.");
                  }
              }
--- 280,284 ----
                  }
                  else {
!                     log.debug("is not a subclass");
                  }
              }



-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to