cvs commit: spice/sandbox/metaclass/src/java/org/realityforge/metaclass/tools/tasks GenerateClassDescriptorsTask.java

Peter Donald <[email protected]> Tue, 18 Nov 2003 03:12:35 -0800
Newsgroups gmane.comp.java.spice.cvs
Message-ID <[email protected]>
donaldp     03/11/18 03:12:35

  Modified:    sandbox/metaclass/src/java/org/realityforge/metaclass/tools/tasks
                        GenerateClassDescriptorsTask.java
  Log:
  Implement Compacting of ClassDescriptors prior to serialization.
  
  Revision  Changes    Path
  1.15      +37 -9     spice/sandbox/metaclass/src/java/org/realityforge/metaclass/tools/tasks/GenerateClassDescriptorsTask.java
  
  Index: GenerateClassDescriptorsTask.java
  ===================================================================
  RCS file: /cvsroot/spice/spice/sandbox/metaclass/src/java/org/realityforge/metaclass/tools/tasks/GenerateClassDescriptorsTask.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- GenerateClassDescriptorsTask.java	29 Oct 2003 08:30:43 -0000	1.14
  +++ GenerateClassDescriptorsTask.java	18 Nov 2003 11:12:35 -0000	1.15
  @@ -34,7 +34,7 @@
    * A Task to generate Attributes descriptors from source files.
    *
    * @author <a href="mailto:peter at realityforge.org">Peter Donald</a>
  - * @version $Revision: 1.14 $ $Date: 2003/10/29 08:30:43 $
  + * @version $Revision: 1.15 $ $Date: 2003/11/18 11:12:35 $
    */
   public class GenerateClassDescriptorsTask
       extends Task
  @@ -61,6 +61,12 @@
       private int m_format = BINARY_TYPE;
   
       /**
  +     * Flag indicating whether the compacter
  +     * should methods with no attributes.
  +     */
  +    private boolean m_keepEmptyMethods = false;
  +
  +    /**
        * Variable that indicates whether non-namespaced tags
        * are filtered out.
        */
  @@ -160,6 +166,16 @@
       }
   
       /**
  +     * Set flag indicating whether Compacter should keep empty methods.
  +     *
  +     * @param keepEmptyMethods  the flag
  +     */
  +    public void setKeepEmptyMethods( final boolean keepEmptyMethods )
  +    {
  +        m_keepEmptyMethods = keepEmptyMethods;
  +    }
  +
  +    /**
        * Set the flag whether non-namespaced tags are filtered out.
        *
        * @param namespaceTagsOnly true to filter out non-namespaced tags
  @@ -185,6 +201,7 @@
   
           m_compiler.setDestDir( m_destDir );
           m_compiler.setMonitor( this );
  +        m_compiler.setKeepEmptyMethods( m_keepEmptyMethods );
   
           setupTarget();
   
  @@ -385,10 +402,7 @@
       }
   
       /**
  -     * Output debug message indicating how many source
  -     * files loaded.
  -     *
  -     * @param classes the classes
  +     * * @see CompilerMonitor#javaClassObjectsLoaded
        */
       public void javaClassObjectsLoaded( final Collection classes )
       {
  @@ -397,14 +411,28 @@
       }
   
       /**
  -     * Output info message indicating how many source
  -     * files will be compiled.
  -     *
  -     * @param classes the classes
  +     * * @see CompilerMonitor#postFilterJavaClassList
        */
       public void postFilterJavaClassList( final Collection classes )
       {
           log( "MetaClass Attributes Compiler building " + classes.size() +
  +             " " + getOutputDescription() + " descriptors.",
  +             Project.MSG_DEBUG );
  +    }
  +
  +    /**
  +     * @see CompilerMonitor#postBuildDescriptorsList
  +     */
  +    public void postBuildDescriptorsList( Collection descriptors )
  +    {
  +    }
  +
  +    /**
  +     * @see CompilerMonitor#postCompactDescriptorsList
  +     */
  +    public void postCompactDescriptorsList( final Collection descriptors )
  +    {
  +        log( "MetaClass Attributes Compiler writing " + descriptors.size() +
                " " + getOutputDescription() + " descriptors.",
                Project.MSG_INFO );
       }
  
  
  


-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl