commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leosu...@apache.org
Subject cvs commit: jakarta-commons-sandbox/attributes/compiler/src/java/org/apache/commons/attributes/compiler AttributeCompiler.java
Date Mon, 26 Jan 2004 19:47:25 GMT
leosutic    2004/01/26 11:47:25

  Modified:    attributes/compiler/src/java/org/apache/commons/attributes/compiler
                        AttributeCompiler.java
  Log:
  Changed the compiler to generate attribute repository classes
  that could be garbage-collected after the information in them
  had been put in the cache.
  
  Revision  Changes    Path
  1.10      +9 -9      jakarta-commons-sandbox/attributes/compiler/src/java/org/apache/commons/attributes/compiler/AttributeCompiler.java
  
  Index: AttributeCompiler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/attributes/compiler/src/java/org/apache/commons/attributes/compiler/AttributeCompiler.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- AttributeCompiler.java	22 Jan 2004 11:00:13 -0000	1.9
  +++ AttributeCompiler.java	26 Jan 2004 19:47:25 -0000	1.10
  @@ -320,13 +320,13 @@
               
               pw.println ("public class " + className + "$__attributeRepository implements
org.apache.commons.attributes.AttributeRepositoryClass {");
               {
  -                pw.println ("    private static final java.util.Set classAttributes = new
java.util.HashSet ();");
  -                pw.println ("    private static final java.util.Map fieldAttributes = new
java.util.HashMap ();");
  -                pw.println ("    private static final java.util.Map methodAttributes =
new java.util.HashMap ();");
  -                pw.println ("    private static final java.util.Map constructorAttributes
= new java.util.HashMap ();");
  +                pw.println ("    private final java.util.Set classAttributes = new java.util.HashSet
();");
  +                pw.println ("    private final java.util.Map fieldAttributes = new java.util.HashMap
();");
  +                pw.println ("    private final java.util.Map methodAttributes = new java.util.HashMap
();");
  +                pw.println ("    private final java.util.Map constructorAttributes = new
java.util.HashMap ();");
                   pw.println ();
                   
  -                pw.println ("    static {");
  +                pw.println ("    public " + className + "$__attributeRepository " + "()
{");
                   pw.println ("        initClassAttributes ();");
                   pw.println ("        initMethodAttributes ();");
                   pw.println ("        initFieldAttributes ();");
  @@ -340,14 +340,14 @@
                   pw.println ("    public java.util.Map getMethodAttributes () { return methodAttributes;
}");
                   pw.println ();
                   
  -                pw.println ("    private static void initClassAttributes () {");
  +                pw.println ("    private void initClassAttributes () {");
                   addExpressions (xClass.getDoc ().getTags (), pw, "classAttributes", sourceFile.getPath
());
                   pw.println ("    }");
                   pw.println ();
                   
                   // ---- Field Attributes
                   
  -                pw.println ("    private static void initFieldAttributes () {");
  +                pw.println ("    private void initFieldAttributes () {");
                   pw.println ("        java.util.Set attrs = null;");
                   for (Iterator iter = xClass.getFields ().iterator (); iter.hasNext ();)
{
                       XField member = (XField) iter.next ();
  @@ -365,7 +365,7 @@
                   
                   // ---- Method Attributes
                   
  -                pw.println ("    private static void initMethodAttributes () {");
  +                pw.println ("    private void initMethodAttributes () {");
                   pw.println ("        java.util.Set attrs = null;");
                   pw.println ("        java.util.List bundle = null;");
                   for (Iterator iter = xClass.getMethods ().iterator (); iter.hasNext ();)
{
  @@ -406,7 +406,7 @@
                   
                   // ---- Constructor Attributes
                   
  -                pw.println ("    private static void initConstructorAttributes () {");
  +                pw.println ("    private void initConstructorAttributes () {");
                   pw.println ("        java.util.Set attrs = null;");
                   pw.println ("        java.util.List bundle = null;");
                   for (Iterator iter = xClass.getConstructors ().iterator (); iter.hasNext
();) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message