User: ara_e_w 
  Date: 02/05/26 13:29:51

  Modified:    core/src/xdoclet Tag: MODULE_REFACTORING_BRANCH
                        DocletSupport.java GenerationManager.java
                        NoInnerClassSubTask.java TemplateSubTask.java
                        XDocletTagSupport.java
  Log:
  xjavadoc javabeaninifiction refactoring
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.11.2.3  +23 -34    xdoclet/core/src/xdoclet/DocletSupport.java
  
  Index: DocletSupport.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/DocletSupport.java,v
  retrieving revision 1.11.2.2
  retrieving revision 1.11.2.3
  diff -u -w -r1.11.2.2 -r1.11.2.3
  --- DocletSupport.java        12 May 2002 11:58:00 -0000      1.11.2.2
  +++ DocletSupport.java        26 May 2002 20:29:51 -0000      1.11.2.3
  @@ -16,14 +16,13 @@
   /**
    * @author    Ara Abrahamian ([EMAIL PROTECTED])
    * @created   Oct 13, 2001
  - * @version   $Revision: 1.11.2.2 $
  + * @version   $Revision: 1.11.2.3 $
    */
   public abstract class DocletSupport
   {
       /**
  -     * The current Tag. Various template tag implementations set this value,
  -     * including looping tags such as forAllClassTags. There's no distinction
  -     * between class/method/field/constructor/whatever tags, and currentTag can
  +     * The current Tag. Various template tag implementations set this value, 
including looping tags such as
  +     * forAllClassTags. There's no distinction between 
class/method/field/constructor/whatever tags, and currentTag can
        * point to any one them.
        */
       protected static XTag currentMethodTag;
  @@ -31,11 +30,9 @@
       protected static XTag currentClassTag;
   
       /**
  -     * The current class stack is used for pushing/poping classes to/from it, so
  -     * that it's possible to work of the current class while not losing the
  -     * previous current class since template tags can be nested inside each
  -     * other and each may set a new class as the current class (by pushing the
  -     * class to top of stack).
  +     * The current class stack is used for pushing/poping classes to/from it, so 
that it's possible to work of the
  +     * current class while not losing the previous current class since template 
tags can be nested inside each other and
  +     * each may set a new class as the current class (by pushing the class to top 
of stack).
        *
        * @see   #setCurrentClass(xjavadoc.XClass)
        * @see   #getCurrentClass()
  @@ -45,9 +42,8 @@
       private transient Stack currentClassStack = null;
   
       /**
  -     * Reference to the current method. Unlike current class stack, there's no
  -     * stack for methods, because rarely you need to alter current method
  -     * reference nestedly.
  +     * Reference to the current method. Unlike current class stack, there's no 
stack for methods, because rarely you
  +     * need to alter current method reference nestedly.
        *
        * @see   #getCurrentMethod()
        * @see   #setCurrentMethod(xjavadoc.XMethod)
  @@ -55,9 +51,8 @@
       private transient XMethod currentMethod = null;
   
       /**
  -     * Reference to the current constructor. Unlike current class stack, there's
  -     * no stack for constructors, because rarely you need to alter current
  -     * constructor reference nestedly.
  +     * Reference to the current constructor. Unlike current class stack, there's no 
stack for constructors, because
  +     * rarely you need to alter current constructor reference nestedly.
        *
        * @see   #getCurrentConstructor()
        * @see   #setCurrentConstructor(xjavadoc.XConstructor)
  @@ -65,9 +60,8 @@
       private transient XConstructor currentConstructor = null;
   
       /**
  -     * Reference to the current field. Unlike current class stack, there's no
  -     * stack for fields, because rarely you need to alter current field
  -     * reference nestedly.
  +     * Reference to the current field. Unlike current class stack, there's no stack 
for fields, because rarely you need
  +     * to alter current field reference nestedly.
        *
        * @see   #getCurrentField()
        * @see   #setCurrentField(xjavadoc.XField)
  @@ -75,9 +69,8 @@
       private transient XField currentField = null;
   
       /**
  -     * Reference to the current package. Unlike current class stack, there's no
  -     * stack for methods, because rarely you need to alter current package
  -     * reference nestedly.
  +     * Reference to the current package. Unlike current class stack, there's no 
stack for methods, because rarely you
  +     * need to alter current package reference nestedly.
        *
        * @see   #getCurrentPackage()
        * @see   #setCurrentPackage(xjavadoc.XPackage)
  @@ -105,8 +98,7 @@
       }
   
       /**
  -     * This method is for backward compatiblity only. Method or Class Tag getter
  -     * should be used instead.
  +     * This method is for backward compatiblity only. Method or Class Tag getter 
should be used instead.
        *
        * @return
        */
  @@ -119,17 +111,17 @@
       }
   
       /**
  -     * Returns true if the clazz generated by xdoclet. An xdoclet generated
  -     * class has a class-level xdoclet-generated tag.
  +     * Returns true if the clazz generated by xdoclet. An xdoclet generated class 
has a class-level xdoclet-generated
  +     * tag.
        *
        * @param clazz            Description of Parameter
        * @return                 The DocletGenerated value
  -     * @ejb:doclet-generated   class tag defined. EJBDoclet does not try to
  -     *      analyze classes that are generated by EJBDoclet itself.
  +     * @ejb:doclet-generated   class tag defined. EJBDoclet does not try to analyze 
classes that are generated by
  +     *      EJBDoclet itself.
        */
       public static boolean isDocletGenerated(XClass clazz)
       {
  -        return clazz.doc().hasTag("xdoclet-generated", false);
  +        return clazz.getDoc().hasTag("xdoclet-generated", false);
       }
   
       /**
  @@ -247,8 +239,7 @@
       }
   
       /**
  -     * Sets current class to clazz by clearing currentClassStack stack and
  -     * pushing clazz into top of it.
  +     * Sets current class to clazz by clearing currentClassStack stack and pushing 
clazz into top of it.
        *
        * @param clazz  The new CurrentClass value
        * @see          #getCurrentClass()
  @@ -260,8 +251,7 @@
       }
   
       /**
  -     * Pushes class clazz to top of currentClassStack stack, making it
  -     * effectively the current class.
  +     * Pushes class clazz to top of currentClassStack stack, making it effectively 
the current class.
        *
        * @param clazz  Description of Parameter
        * @return       Description of the Returned Value
  @@ -275,8 +265,7 @@
       }
   
       /**
  -     * Popes current class from top currentClassStack stack. The poped class is
  -     * no longer the current class.
  +     * Popes current class from top currentClassStack stack. The poped class is no 
longer the current class.
        *
        * @return   Description of the Returned Value
        * @see      #getCurrentClass()
  
  
  
  1.11.2.10 +9 -9      xdoclet/core/src/xdoclet/GenerationManager.java
  
  Index: GenerationManager.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/GenerationManager.java,v
  retrieving revision 1.11.2.9
  retrieving revision 1.11.2.10
  diff -u -w -r1.11.2.9 -r1.11.2.10
  --- GenerationManager.java    24 May 2002 00:57:33 -0000      1.11.2.9
  +++ GenerationManager.java    26 May 2002 20:29:51 -0000      1.11.2.10
  @@ -24,7 +24,7 @@
    *
    * @author    Vincent Harcq ([EMAIL PROTECTED])
    * @created   March 30, 2002
  - * @version   $Revision: 1.11.2.9 $
  + * @version   $Revision: 1.11.2.10 $
    */
   public class GenerationManager implements java.io.Serializable
   {
  @@ -219,22 +219,22 @@
       {
           Log log = LogUtil.getLog(GenerationManager.class, "generation");
   
  -        XClass supers = clazz.superclass();
  +        XClass supers = clazz.getSuperclass();
   
           while (supers != null) {
  -            if (supers.qualifiedName().equals("java.lang.Object")) {
  +            if (supers.getQualifiedName().equals("java.lang.Object")) {
                   return false;
               }
               if (file.lastModified() < supers.lastModified()) {
                   if (log.isDebugEnabled()) {
  -                    log.debug("Generation needed for '" + file.getName() + "' 
because of timestamp of " + supers.qualifiedName());
  +                    log.debug("Generation needed for '" + file.getName() + "' 
because of timestamp of " + supers.getQualifiedName());
                   }
                   return true;
               }
               if (log.isDebugEnabled()) {
  -                log.debug("Reject file '" + clazz.qualifiedName() + "' because of 
timestamp of " + supers.qualifiedName());
  +                log.debug("Reject file '" + clazz.getQualifiedName() + "' because 
of timestamp of " + supers.getQualifiedName());
               }
  -            supers = supers.superclass();
  +            supers = supers.getSuperclass();
           }
   
           return false;
  @@ -246,13 +246,13 @@
   
           if (file.lastModified() < clazz.lastModified()) {
               if (log.isDebugEnabled()) {
  -                log.debug("Generation needed for '" + file.getName() + "' because 
of timestamp of " + clazz.qualifiedName());
  +                log.debug("Generation needed for '" + file.getName() + "' because 
of timestamp of " + clazz.getQualifiedName());
               }
               return true;
           }
   
           if (log.isDebugEnabled()) {
  -            log.debug("Reject file '" + clazz.qualifiedName() + "' because of 
timestamp of " + clazz.qualifiedName());
  +            log.debug("Reject file '" + clazz.getQualifiedName() + "' because of 
timestamp of " + clazz.getQualifiedName());
           }
   
           return false;
  @@ -345,7 +345,7 @@
                   for (int j = 0; j < classes.length; j++) {
                       XClass aClass = classes[j];
                       String ejbName = MessageFormat.format(mergeFilePattern, new 
Object[]{AbstractProgramElementTagsHandler.getClassNameFor(aClass)});
  -                    String mergeFileName = 
PackageTagsHandler.packageNameAsPathFor(aClass.containingPackage()) + File.separator + 
ejbName;
  +                    String mergeFileName = 
PackageTagsHandler.packageNameAsPathFor(aClass.getContainingPackage()) + 
File.separator + ejbName;
   
                       if (subTask.getMergeDir() != null)
                           mergeFiles.add(new File(subTask.getMergeDir(), 
mergeFileName));
  
  
  
  1.5.2.3   +2 -3      xdoclet/core/src/xdoclet/NoInnerClassSubTask.java
  
  Index: NoInnerClassSubTask.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/NoInnerClassSubTask.java,v
  retrieving revision 1.5.2.2
  retrieving revision 1.5.2.3
  diff -u -w -r1.5.2.2 -r1.5.2.3
  --- NoInnerClassSubTask.java  12 May 2002 11:58:00 -0000      1.5.2.2
  +++ NoInnerClassSubTask.java  26 May 2002 20:29:51 -0000      1.5.2.3
  @@ -7,8 +7,7 @@
   import xjavadoc.XClass;
   
   /**
  - * This subtask only matches regular classes, not inner classes. It was written
  - * to generate JUnit classes for xjavadoc.
  + * This subtask only matches regular classes, not inner classes. It was written to 
generate JUnit classes for xjavadoc.
    *
    * @author    Aslak Helles�y
    * @created   26. februar 2002
  @@ -26,6 +25,6 @@
       protected boolean matchesGenerationRules(XClass clazz) throws XDocletException
       {
           // don't want to generate for inner classes
  -        return clazz.containingClass() == null;
  +        return clazz.getContainingClass() == null;
       }
   }
  
  
  
  1.41.2.14 +10 -10    xdoclet/core/src/xdoclet/TemplateSubTask.java
  
  Index: TemplateSubTask.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/TemplateSubTask.java,v
  retrieving revision 1.41.2.13
  retrieving revision 1.41.2.14
  diff -u -w -r1.41.2.13 -r1.41.2.14
  --- TemplateSubTask.java      24 May 2002 00:59:35 -0000      1.41.2.13
  +++ TemplateSubTask.java      26 May 2002 20:29:51 -0000      1.41.2.14
  @@ -34,7 +34,7 @@
    * @author            Ara Abrahamian ([EMAIL PROTECTED])
    * @created           Sep 25, 2001
    * @xdoclet:subtask   name="template" parent="xdoclet.DocletTask"
  - * @version           $Revision: 1.41.2.13 $
  + * @version           $Revision: 1.41.2.14 $
    */
   public class TemplateSubTask extends SubTask
   {
  @@ -466,10 +466,10 @@
       {
           Log log = LogUtil.getLog(TemplateSubTask.class, "getGeneratedFileName");
   
  -        XPackage pak = clazz.containingPackage();
  +        XPackage pak = clazz.getContainingPackage();
           String packageName = isPackageSubstitutionInheritanceSupported() == true ? 
PackageTagsHandler.packageNameAsPathFor(pak) : null;
   
  -        String qualifiedName = clazz.qualifiedName();
  +        String qualifiedName = clazz.getQualifiedName();
           int lastDot = qualifiedName.lastIndexOf('.');
           String name = qualifiedName.substring(lastDot + 1);
   
  @@ -575,7 +575,7 @@
           XClass[] classes;
   
           try {
  -            classes = XJavaDoc.getInstance().sourceClasses();
  +            classes = XJavaDoc.getInstance().getSourceClasses();
           }
           catch (XJavaDocException e) {
               throw new XDocletException(e, e.getMessage());
  @@ -604,14 +604,14 @@
           Log log = LogUtil.getLog(TemplateSubTask.class, "matchesGenerationRules");
   
           // skip inner classes
  -        if (clazz.containingClass() != null) {
  +        if (clazz.getContainingClass() != null) {
               return false;
           }
   
           // skip automatically generated classes
           if (isDocletGenerated(clazz)) {
               if (log.isDebugEnabled()) {
  -                log.debug("Reject file '" + clazz.qualifiedName() + "' because it 
is a doclet generated one.");
  +                log.debug("Reject file '" + clazz.getQualifiedName() + "' because 
it is a doclet generated one.");
               }
               return false;
           }
  @@ -624,7 +624,7 @@
   
               if (TypeTagsHandler.isOfType(clazz, type, 
TypeTagsHandler.extractExtentType(getExtent())) == true) {
                   if (log.isDebugEnabled()) {
  -                    log.debug("Accept class '" + clazz.qualifiedName() + "' because 
it is of type '" + type + "'.");
  +                    log.debug("Accept class '" + clazz.getQualifiedName() + "' 
because it is of type '" + type + "'.");
                   }
                   match = true;
               }
  @@ -633,9 +633,9 @@
               return false;
   
           if (getHavingClassTag() != null) {
  -            if (!clazz.doc().hasTag(getHavingClassTag(), false)) {
  +            if (!clazz.getDoc().hasTag(getHavingClassTag(), false)) {
                   if (log.isDebugEnabled()) {
  -                    log.debug("Reject class '" + clazz.qualifiedName() + "' because 
it doesn't have class tag '" + getHavingClassTag() + "'.");
  +                    log.debug("Reject class '" + clazz.getQualifiedName() + "' 
because it doesn't have class tag '" + getHavingClassTag() + "'.");
                   }
                   return false;
               }
  @@ -698,7 +698,7 @@
           Log log = LogUtil.getLog(TemplateSubTask.class, "engineStarted");
   
           if (isGenerationPerClass()) {
  -            
System.out.println(Translator.getString("generating_template_output_per_class", new 
String[]{getCurrentClass().qualifiedName(), getTemplateURL().toString()}));
  +            
System.out.println(Translator.getString("generating_template_output_per_class", new 
String[]{getCurrentClass().getQualifiedName(), getTemplateURL().toString()}));
           }
           else {
               
System.out.println(Translator.getString("generating_template_output_single_file", new 
String[]{getDestinationFile(), getTemplateURL().toString()}));
  
  
  
  1.43.2.5  +20 -20    xdoclet/core/src/xdoclet/XDocletTagSupport.java
  
  Index: XDocletTagSupport.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/XDocletTagSupport.java,v
  retrieving revision 1.43.2.4
  retrieving revision 1.43.2.5
  diff -u -w -r1.43.2.4 -r1.43.2.5
  --- XDocletTagSupport.java    15 May 2002 07:33:35 -0000      1.43.2.4
  +++ XDocletTagSupport.java    26 May 2002 20:29:51 -0000      1.43.2.5
  @@ -32,7 +32,7 @@
    *
    * @author    Dmitri Colebatch ([EMAIL PROTECTED])
    * @created   October 12, 2001
  - * @version   $Revision: 1.43.2.4 $
  + * @version   $Revision: 1.43.2.5 $
    */
   public abstract class XDocletTagSupport extends TemplateTagHandler
   {
  @@ -416,11 +416,11 @@
   
                   if (currentParamNumber != null) {
                       XProgramElement programElement = getProgramElement(forType);
  -                    XDoc doc = programElement.doc();
  -                    XTag tag = doc.tag(currentTag, superclasses);
  +                    XDoc doc = programElement.getDoc();
  +                    XTag tag = doc.getTag(currentTag, superclasses);
   
                       if (tag != null) {
  -                        tagValue = tag.value();
  +                        tagValue = tag.getValue();
                       }
                       if (tagValue != null && tagValue.trim().length() == 0) {
                           tagValue = null;
  @@ -469,7 +469,7 @@
               return null;
           }
   
  -        XDoc doc = programElement.doc();
  +        XDoc doc = programElement.getDoc();
   
           return getTagValue(
               forType,
  @@ -514,12 +514,12 @@
           else if (forType == FOR_CLASS)
               tag = getCurrentClassTag();
   
  -        if (tag != null && !tag.name().equals(tagName))
  +        if (tag != null && !tag.getName().equals(tagName))
               tag = null;
   
           if (tag == null) {
               // if there is no current tag, look in the doc
  -            tag = doc.tag(tagName, superclasses);
  +            tag = doc.getTag(tagName, superclasses);
           }
   
           String value = null;
  @@ -528,10 +528,10 @@
           if (tag != null) {
               if (paramName == null) {
                   // the value of the tag is requested
  -                value = tag.value();
  +                value = tag.getValue();
               }
               else {
  -                value = tag.attributeValue(paramName);
  +                value = tag.getAttributeValue(paramName);
               }
           }
   
  @@ -598,8 +598,8 @@
           else if (forType == FOR_CLASS)
               currentTag = getCurrentClassTag();
   
  -        if (currentTag != null && currentTag.name().equals(tagName)) {
  -            attributeValue = currentTag.attributeValue(paramName);
  +        if (currentTag != null && currentTag.getName().equals(tagName)) {
  +            attributeValue = currentTag.getAttributeValue(paramName);
           }
           else {
               attributeValue = getTagValue(attributes, forType);
  @@ -626,25 +626,25 @@
               XMethod method = (XMethod) programElement;
   
               throw new 
XDocletException(Translator.getString("mandatory_tag_param_missing_method",
  -                new String[]{paramName, tagName, method.name(), 
method.containingClass().qualifiedName()}));
  +                new String[]{paramName, tagName, method.getName(), 
method.getContainingClass().getQualifiedName()}));
           }
           else if (programElement instanceof XClass) {
               XClass clazz = (XClass) programElement;
   
               throw new 
XDocletException(Translator.getString("mandatory_tag_param_missing_class",
  -                new String[]{paramName, tagName, clazz.qualifiedName()}));
  +                new String[]{paramName, tagName, clazz.getQualifiedName()}));
           }
           else if (programElement instanceof XConstructor) {
               XConstructor constructor = (XConstructor) programElement;
   
               throw new 
XDocletException(Translator.getString("mandatory_tag_param_missing_constructor",
  -                new String[]{paramName, tagName, 
constructor.containingClass().qualifiedName()}));
  +                new String[]{paramName, tagName, 
constructor.getContainingClass().getQualifiedName()}));
           }
           else if (programElement instanceof XField) {
               XField field = (XField) programElement;
   
               throw new 
XDocletException(Translator.getString("mandatory_tag_param_missing_field",
  -                new String[]{paramName, tagName, field.name(), 
field.containingClass().qualifiedName()}));
  +                new String[]{paramName, tagName, field.getName(), 
field.getContainingClass().getQualifiedName()}));
           }
           else {
               throw new XDocletException(Translator.getString("bad_prgelemdoc_type",
  @@ -768,25 +768,25 @@
               XMethod method = (XMethod) programElement;
   
               throw new 
XDocletException(Translator.getString("invalid_tag_param_value_method",
  -                new String[]{value, paramName, tagName, method.name(), 
method.containingClass().qualifiedName(), validValues}));
  +                new String[]{value, paramName, tagName, method.getName(), 
method.getContainingClass().getQualifiedName(), validValues}));
           }
           else if (programElement instanceof XClass) {
               XClass clazz = (XClass) programElement;
   
               throw new 
XDocletException(Translator.getString("invalid_tag_param_value_class",
  -                new String[]{value, paramName, tagName, clazz.qualifiedName(), 
validValues}));
  +                new String[]{value, paramName, tagName, clazz.getQualifiedName(), 
validValues}));
           }
           else if (programElement instanceof XConstructor) {
               XConstructor constructor = (XConstructor) programElement;
   
               throw new 
XDocletException(Translator.getString("invalid_tag_param_value_constructor",
  -                new String[]{value, paramName, tagName, 
constructor.containingClass().qualifiedName(), validValues}));
  +                new String[]{value, paramName, tagName, 
constructor.getContainingClass().getQualifiedName(), validValues}));
           }
           else if (programElement instanceof XField) {
               XField field = (XField) programElement;
   
               throw new 
XDocletException(Translator.getString("invalid_tag_param_value_field",
  -                new String[]{value, paramName, tagName, field.name(), 
field.containingClass().qualifiedName(), validValues}));
  +                new String[]{value, paramName, tagName, field.getName(), 
field.getContainingClass().getQualifiedName(), validValues}));
           }
           else {
               throw new XDocletException(Translator.getString("bad_prgelemdoc_type",
  @@ -803,7 +803,7 @@
        */
       protected String modifiers(int forType) throws XDocletException
       {
  -        return getProgramElement(forType).modifiers();
  +        return getProgramElement(forType).getModifiers();
       }
   
       /**
  
  
  

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

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

Reply via email to