commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1310111 - /commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/processor/DigesterAnnotationsProcessor.java
Date Thu, 05 Apr 2012 22:28:38 GMT
Author: simonetripodi
Date: Thu Apr  5 22:28:38 2012
New Revision: 1310111

URL: http://svn.apache.org/viewvc?rev=1310111&view=rev
Log:
assigned meaningful variables name to code generation components

Modified:
    commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/processor/DigesterAnnotationsProcessor.java

Modified: commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/processor/DigesterAnnotationsProcessor.java
URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/processor/DigesterAnnotationsProcessor.java?rev=1310111&r1=1310110&r2=1310111&view=diff
==============================================================================
--- commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/processor/DigesterAnnotationsProcessor.java
(original)
+++ commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/processor/DigesterAnnotationsProcessor.java
Thu Apr  5 22:28:38 2012
@@ -23,12 +23,10 @@ import static com.sun.codemodel.JMod.FIN
 import static com.sun.codemodel.JMod.PROTECTED;
 import static com.sun.codemodel.JMod.PUBLIC;
 import static com.sun.codemodel.JType.parse;
-
 import static java.lang.String.format;
-
-import static javax.tools.Diagnostic.Kind.*;
-
 import static java.util.Arrays.asList;
+import static javax.tools.Diagnostic.Kind.ERROR;
+import static javax.tools.Diagnostic.Kind.OTHER;
 
 import java.io.IOException;
 import java.util.Date;
@@ -56,6 +54,7 @@ import org.apache.commons.digester3.anno
 import org.apache.commons.digester3.binder.AbstractRulesModule;
 import org.kohsuke.MetaInfServices;
 
+import com.sun.codemodel.JBlock;
 import com.sun.codemodel.JClassAlreadyExistsException;
 import com.sun.codemodel.JCodeModel;
 import com.sun.codemodel.JDefinedClass;
@@ -111,18 +110,17 @@ public class DigesterAnnotationsProcesso
 
         try
         {
-            JDefinedClass definedClass = modulePackage._class( FINAL | PUBLIC, className
);
-            definedClass.javadoc().add( format( "Generated by Apache Commons Digester at
%s", new Date() ) );
-            definedClass._extends( AbstractRulesModule.class );
-
-            JMethod method = definedClass.method( PROTECTED, parse( codeModel, "void" ),
"configure" );
-            method.annotate( Override.class );
+            JDefinedClass rulesModuleClass = modulePackage._class( FINAL | PUBLIC, className
);
+            rulesModuleClass.javadoc().add( format( "Generated by Apache Commons Digester
at %s", new Date() ) );
+            rulesModuleClass._extends( AbstractRulesModule.class );
+
+            JMethod configureMethod = rulesModuleClass.method( PROTECTED, parse( codeModel,
"void" ), "configure" );
+            configureMethod.annotate( Override.class );
+            JBlock configureMethodBody = configureMethod.body();
 
             // Loop through the annotations that we are going to process
             for ( TypeElement annotation : annotations )
             {
-
-
                 // Get the members
                 for ( Element element : environment.getElementsAnnotatedWith( annotation
) )
                 {



Mime
View raw message