User: pathoss 
  Date: 02/05/15 09:15:29

  Modified:    modules/ejb/src/xdoclet/modules/ejb/entity Tag:
                        MODULE_REFACTORING_BRANCH CmpTagsHandler.java
  Log:
  Cleanup.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.6   +26 -32    
xdoclet/modules/ejb/src/xdoclet/modules/ejb/entity/Attic/CmpTagsHandler.java
  
  Index: CmpTagsHandler.java
  ===================================================================
  RCS file: 
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/entity/Attic/CmpTagsHandler.java,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -w -r1.1.2.5 -r1.1.2.6
  --- CmpTagsHandler.java       12 May 2002 13:53:28 -0000      1.1.2.5
  +++ CmpTagsHandler.java       15 May 2002 16:15:29 -0000      1.1.2.6
  @@ -28,11 +28,10 @@
    * @author               Ara Abrahamian ([EMAIL PROTECTED])
    * @created              Oct 16, 2001
    * @xdoclet:taghandler   namespace="EjbCmp"
  - * @version              $Revision: 1.1.2.5 $
  + * @version              $Revision: 1.1.2.6 $
    */
   public class CmpTagsHandler extends EntityTagsHandler
   {
  -
       /**
        * Gets the EntityCmpClassFor attribute of the CmpTagsHandler class
        *
  @@ -43,7 +42,7 @@
       public static String getEntityCmpClassFor(XClass clazz) throws XDocletException
       {
           String fileName = clazz.containingPackage().name();
  -        String entity_name = MessageFormat.format(getEntityCmpClassPattern(), new 
Object[]{EjbTagsHandler.getShortEjbNameFor(clazz)});
  +        String entityName = MessageFormat.format(getEntityCmpClassPattern(), new 
Object[]{EjbTagsHandler.getShortEjbNameFor(clazz)});
   
           // Fix package name
           fileName = choosePackage(fileName, null, EntityCmpSubTask.SUBTASK_NAME);
  @@ -51,20 +50,19 @@
               fileName += ".";
           }
   
  -        fileName += entity_name;
  +        fileName += entityName;
   
           return fileName;
       }
   
       /**
  -     * Returns true if clazz is an CMP entity bean, false otherwise. Entity type
  -     * is determined by looking at the ejb:bean's type parameter.
  +     * Returns true if clazz is an CMP entity bean, false otherwise. Entity type is 
determined by looking at the
  +     * ejb:bean's type parameter.
        *
        * @param clazz                 Description of Parameter
        * @return                      The EntityCmp value
        * @exception XDocletException
  -     * @todo                        refactor this method up in superclass with
  -     *      isEntityBmp
  +     * @todo                        refactor this method up in superclass with 
isEntityBmp
        */
       public static boolean isEntityCmp(XClass clazz) throws XDocletException
       {
  @@ -95,8 +93,8 @@
       }
   
       /**
  -     * Returns true if ejbspec config parameter is "2.0" and ejb:bean's
  -     * cmp-version either not defined or is "2.x", false otherwise.
  +     * Returns true if ejbspec config parameter is "2.0" and ejb:bean's cmp-version 
either not defined or is "2.x",
  +     * false otherwise.
        *
        * @param clazz
        * @return                      Description of the Returned Value
  @@ -137,9 +135,9 @@
               );
   
           if (cmp == null) {
  -            EntityCmpSubTask entitycmp_subtask = ((EntityCmpSubTask) 
DocletContext.getInstance().getSubTaskBy(EntityCmpSubTask.SUBTASK_NAME));
  +            EntityCmpSubTask entityCmpSubtask = ((EntityCmpSubTask) 
DocletContext.getInstance().getSubTaskBy(EntityCmpSubTask.SUBTASK_NAME));
   
  -            cmp = entitycmp_subtask.getCmpSpec();
  +            cmp = entityCmpSubtask.getCmpSpec();
           }
   
           return EntityCmpSubTask.CmpSpecVersion.CMP_2_0.equals(cmp);
  @@ -152,10 +150,10 @@
        */
       protected static String getEntityCmpClassPattern()
       {
  -        EntityCmpSubTask entitycmp_subtask = ((EntityCmpSubTask) 
DocletContext.getInstance().getSubTaskBy(EntityCmpSubTask.SUBTASK_NAME));
  +        EntityCmpSubTask entityCmpSubtask = ((EntityCmpSubTask) 
DocletContext.getInstance().getSubTaskBy(EntityCmpSubTask.SUBTASK_NAME));
   
  -        if (entitycmp_subtask != null) {
  -            return entitycmp_subtask.getEntityCmpClassPattern();
  +        if (entityCmpSubtask != null) {
  +            return entityCmpSubtask.getEntityCmpClassPattern();
           }
           else {
               return EntityCmpSubTask.DEFAULT_ENTITYCMP_CLASS_PATTERN;
  @@ -191,8 +189,7 @@
       }
   
       /**
  -     * Evaluate the body block if not using EJB 2.0 or using EJB 2.0 but CMP
  -     * version 1.x.
  +     * Evaluate the body block if not using EJB 2.0 or using EJB 2.0 but CMP 
version 1.x.
        *
        * @param template              The body of the block tag
        * @exception XDocletException
  @@ -222,8 +219,7 @@
       }
   
       /**
  -     * Evaluates the body block for each EJBean derived from EntityBean which is
  -     * CMP.
  +     * Evaluates the body block for each EJBean derived from EntityBean which is 
CMP.
        *
        * @param template              The body of the block tag
        * @exception XDocletException
  @@ -253,9 +249,8 @@
       }
   
       /**
  -     * Evaluates the body block for each persistent field of current class (if
  -     * entity CMP). Looks at super classes as well. Searches for the getter
  -     * methods which has ejb:persistent-field defined.
  +     * Evaluates the body block for each persistent field of current class (if 
entity CMP). Looks at super classes as
  +     * well. Searches for the getter methods which has ejb:persistent-field defined.
        *
        * @param template              The body of the block tag
        * @exception XDocletException
  @@ -272,23 +267,23 @@
   
               do {
                   XMethod[] methods = XDocletTagSupport.getCurrentClass().methods();
  -                XMethod old_cur_method = XDocletTagSupport.getCurrentMethod();
  +                XMethod oldCurrentMethod = XDocletTagSupport.getCurrentMethod();
   
                   for (int j = 0; j < methods.length; j++) {
  -                    XMethod current_method = methods[j];
  +                    XMethod currentMethod = methods[j];
   
  -                    if (!already.contains(current_method.name())) {
  -                        XDocletTagSupport.setCurrentMethod(current_method);
  +                    if (!already.contains(currentMethod.name())) {
  +                        XDocletTagSupport.setCurrentMethod(currentMethod);
   
  -                        if (PersistentTagsHandler.isPersistentField(current_method) 
&& MethodTagsHandler.isGetter(current_method.name())) {
  +                        if (PersistentTagsHandler.isPersistentField(currentMethod) 
&& MethodTagsHandler.isGetter(currentMethod.name())) {
                               generate(template);
                           }
   
  -                        already.add(current_method.name());
  +                        already.add(currentMethod.name());
                       }
                   }
   
  -                XDocletTagSupport.setCurrentMethod(old_cur_method);
  +                XDocletTagSupport.setCurrentMethod(oldCurrentMethod);
   
                   // Add super class info
                   
XDocletTagSupport.pushCurrentClass(XDocletTagSupport.getCurrentClass().superclass());
  @@ -297,5 +292,4 @@
               XDocletTagSupport.setCurrentClass(oldClass);
           }
       }
  -
   }
  
  
  

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to