groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject [14/50] [abbrv] groovy git commit: GROOVY-8118: Builder's DefaultStrategy has small doc error
Date Fri, 07 Apr 2017 13:30:57 GMT
GROOVY-8118: Builder's DefaultStrategy has small doc error


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

Branch: refs/heads/parrot
Commit: b842d1bbd43e3b4d3f901084876ce4845b37319d
Parents: 4f4aa73
Author: paulk <paulk@asert.com.au>
Authored: Mon Mar 13 08:55:19 2017 +1000
Committer: paulk <paulk@asert.com.au>
Committed: Mon Mar 13 08:55:19 2017 +1000

----------------------------------------------------------------------
 src/main/groovy/transform/builder/DefaultStrategy.java | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/b842d1bb/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 c863410..3c4b048 100644
--- a/src/main/groovy/transform/builder/DefaultStrategy.java
+++ b/src/main/groovy/transform/builder/DefaultStrategy.java
@@ -76,7 +76,7 @@ import static org.objectweb.asm.Opcodes.ACC_STATIC;
  *     String lastName
  *     int age
  * }
- * def person = Person.builder().firstName("Robert").lastName("Lewandowski").age(21)
+ * def person = Person.builder().firstName("Robert").lastName("Lewandowski").age(21).build()
  * assert person.firstName == "Robert"
  * assert person.lastName == "Lewandowski"
  * assert person.age == 21
@@ -90,11 +90,11 @@ import static org.objectweb.asm.Opcodes.ACC_STATIC;
  *     String lastName
  *     int age
  * }
- * def p2 = Person.builder().setFirstName("Robert").setLastName("Lewandowski").setAge(21)
+ * def p2 = Person.builder().setFirstName("Robert").setLastName("Lewandowski").setAge(21).build()
  * </pre>
  * or using a prefix of 'with' would result in usage like this:
  * <pre>
- * def p3 = Person.builder().withFirstName("Robert").withLastName("Lewandowski").withAge(21)
+ * def p3 = Person.builder().withFirstName("Robert").withLastName("Lewandowski").withAge(21).build()
  * </pre>
  *
  * You can also use the {@code @Builder} annotation in combination with this strategy on
one or more constructor or
@@ -160,8 +160,6 @@ import static org.objectweb.asm.Opcodes.ACC_STATIC;
  *
  * The 'forClass' annotation attribute for the {@code @Builder} transform isn't applicable
for this strategy.
  * The 'useSetters' annotation attribute for the {@code @Builder} transform is ignored by
this strategy which always uses setters.
- *
- * @author Paul King
  */
 public class DefaultStrategy extends BuilderASTTransformation.AbstractBuilderStrategy {
     private static final Expression DEFAULT_INITIAL_VALUE = null;


Mime
View raw message