groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject [1/2] incubator-groovy git commit: GROOVY-7501: omit package name from builder class name
Date Thu, 16 Jul 2015 02:35:30 GMT
Repository: incubator-groovy
Updated Branches:
  refs/heads/master cf2691e06 -> 653690c1a


GROOVY-7501: omit package name from builder class name


Project: http://git-wip-us.apache.org/repos/asf/incubator-groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-groovy/commit/e7fbe0d5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-groovy/tree/e7fbe0d5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-groovy/diff/e7fbe0d5

Branch: refs/heads/master
Commit: e7fbe0d5b8edaac6633a92e26d925452cb6c30de
Parents: cf2691e
Author: Marc Bogaerts <marcbogaerts@telenet.be>
Authored: Sun Jul 12 22:28:58 2015 +0200
Committer: paulk <paulk@asert.com.au>
Committed: Thu Jul 16 12:25:11 2015 +1000

----------------------------------------------------------------------
 src/main/groovy/transform/builder/DefaultStrategy.java     | 2 +-
 src/main/groovy/transform/builder/InitializerStrategy.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/e7fbe0d5/src/main/groovy/transform/builder/DefaultStrategy.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/transform/builder/DefaultStrategy.java b/src/main/groovy/transform/builder/DefaultStrategy.java
index 2ae64a1..1c90adc 100644
--- a/src/main/groovy/transform/builder/DefaultStrategy.java
+++ b/src/main/groovy/transform/builder/DefaultStrategy.java
@@ -224,7 +224,7 @@ public class DefaultStrategy extends BuilderASTTransformation.AbstractBuilderStr
     }
 
     private String getFullName(AnnotationNode anno, ClassNode buildee) {
-        String builderClassName = getMemberStringValue(anno, "builderClassName", buildee.getName()
+ "Builder");
+        String builderClassName = getMemberStringValue(anno, "builderClassName", buildee.getNameWithoutPackage()
+ "Builder");
         return buildee.getName() + "$" + builderClassName;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/e7fbe0d5/src/main/groovy/transform/builder/InitializerStrategy.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/transform/builder/InitializerStrategy.java b/src/main/groovy/transform/builder/InitializerStrategy.java
index d872550..46de3f8 100644
--- a/src/main/groovy/transform/builder/InitializerStrategy.java
+++ b/src/main/groovy/transform/builder/InitializerStrategy.java
@@ -184,7 +184,7 @@ public class InitializerStrategy extends BuilderASTTransformation.AbstractBuilde
     }
 
     private String getBuilderClassName(ClassNode buildee, AnnotationNode anno) {
-        return getMemberStringValue(anno, "builderClassName", buildee.getName() + "Initializer");
+        return getMemberStringValue(anno, "builderClassName", buildee.getNameWithoutPackage()
+ "Initializer");
     }
 
     private void addFields(ClassNode buildee, List<FieldNode> filteredFields, ClassNode
builder) {


Mime
View raw message