[2/2] groovy git commit: test more javadoc code examples

2016-03-05 Thread pascalschumacher
test more javadoc code examples


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

Branch: refs/heads/master
Commit: c80a3077780602c362c9703950d8286e0c1292ee
Parents: 086f8df
Author: pascalschumacher 
Authored: Sat Mar 5 13:51:10 2016 +0100
Committer: pascalschumacher 
Committed: Sat Mar 5 13:51:10 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/groovy/blob/c80a3077/src/main/groovy/transform/SourceURI.java
--
diff --git a/src/main/groovy/transform/SourceURI.java 
b/src/main/groovy/transform/SourceURI.java
index a3600d2..4104369 100644
--- a/src/main/groovy/transform/SourceURI.java
+++ b/src/main/groovy/transform/SourceURI.java
@@ -37,7 +37,7 @@ import java.lang.annotation.Target;
  * 
  *
  * Example usage:
- * 
+ * 
  * {@code @groovy.transform.SourceURI} def sourceURI
  *
  * assert sourceURI instanceof java.net.URI

http://git-wip-us.apache.org/repos/asf/groovy/blob/c80a3077/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 291f50e..117273c 100644
--- a/src/main/groovy/transform/builder/DefaultStrategy.java
+++ b/src/main/groovy/transform/builder/DefaultStrategy.java
@@ -85,8 +85,8 @@ import static org.objectweb.asm.Opcodes.ACC_STATIC;
  * 
  * The {@code prefix} annotation attribute can be used to create setters with 
a different naming convention. The default is the
  * empty string but you could change that to "set" as follows:
- * 
- * {@code @Builder}(prefix='set')
+ * 
+ * {@code @groovy.transform.builder.Builder}(prefix='set')
  * class Person {
  * String firstName
  * String lastName



groovy git commit: test more javadoc code examples

2016-03-05 Thread pascalschumacher
Repository: groovy
Updated Branches:
  refs/heads/master e610cc93d -> 625d5dce2


test more javadoc code examples


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

Branch: refs/heads/master
Commit: 625d5dce27b816523fe076eae9a7c538e6ede14e
Parents: e610cc9
Author: pascalschumacher 
Authored: Sat Mar 5 13:32:20 2016 +0100
Committer: pascalschumacher 
Committed: Sat Mar 5 13:32:20 2016 +0100

--
 src/main/groovy/lang/Category.java  |  4 +--
 src/main/groovy/lang/Closure.java   | 34 +++-
 src/main/groovy/lang/Delegate.java  |  2 +-
 src/main/groovy/time/TimeCategory.java  |  4 +--
 src/main/groovy/transform/ASTTest.java  |  2 +-
 .../groovy/transform/InheritConstructors.java   |  8 ++---
 src/main/groovy/transform/ToString.java | 28 ++--
 src/main/groovy/transform/TupleConstructor.java |  4 +--
 8 files changed, 32 insertions(+), 54 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/groovy/blob/625d5dce/src/main/groovy/lang/Category.java
--
diff --git a/src/main/groovy/lang/Category.java 
b/src/main/groovy/lang/Category.java
index 4463a4d..f880828 100644
--- a/src/main/groovy/lang/Category.java
+++ b/src/main/groovy/lang/Category.java
@@ -61,7 +61,7 @@ import java.lang.annotation.Target;
  * 
  * An example showing a {@code use} statement (allowing fine-grained 
application of
  * the category methods):
- * 
+ * 
  * {@code @Category}(Integer)
  * class IntegerOps {
  * def triple() {
@@ -74,7 +74,7 @@ import java.lang.annotation.Target;
  * }
  * 
  * Or, "mixing in" your methods at runtime:
- * 
+ * 
  * {@code @Category}(List)
  * class Shuffler {
  * def shuffle() {

http://git-wip-us.apache.org/repos/asf/groovy/blob/625d5dce/src/main/groovy/lang/Closure.java
--
diff --git a/src/main/groovy/lang/Closure.java 
b/src/main/groovy/lang/Closure.java
index 19fc960..503a01b 100644
--- a/src/main/groovy/lang/Closure.java
+++ b/src/main/groovy/lang/Closure.java
@@ -66,7 +66,7 @@ public abstract class Closure extends GroovyObjectSupport 
implements Cloneabl
  * With this resolveStrategy set the closure will attempt to resolve 
property references and methods to the
  * owner first, then the delegate (this is the default strategy).
  *
- * For example the following code :
+ * For example the following code:
  * 
  * class Test {
  * def x = 30
@@ -77,21 +77,15 @@ public abstract class Closure extends 
GroovyObjectSupport implements Cloneabl
  * def cl = { y = x + y }
  * cl.delegate = data
  * cl()
- * println x
- * println y
- * println data
+ * assert x == 30
+ * assert y == 70
+ * assert data == [x:10, y:20]
  * }
  * }
  *
  * new Test().run()
  * 
- * will output :
- * 
- * 30
- * 70
- * [x:10, y:20]
- * 
- * because the x and y fields declared in the Test class shadow the 
variables in the delegate.
+ * Will succeed, because the x and y fields declared in the Test class 
shadow the variables in the delegate.
  * Note that local variables are always looked up first, independently 
of the resolution strategy.
  */
 public static final int OWNER_FIRST = 0;
@@ -100,8 +94,8 @@ public abstract class Closure extends GroovyObjectSupport 
implements Cloneabl
  * With this resolveStrategy set the closure will attempt to resolve 
property references and methods to the
  * delegate first then the owner.
  *
- * For example the following code :
- * 
+ * For example the following code:
+ * 
  * class Test {
  * def x = 30
  * def y = 40
@@ -112,21 +106,15 @@ public abstract class Closure extends 
GroovyObjectSupport implements Cloneabl
  * cl.delegate = data
  * cl.resolveStrategy = Closure.DELEGATE_FIRST
  * cl()
- * println x
- * println y
- * println data
+ * assert x == 30
+ * assert y == 40
+ * assert data == [x:10, y:30]
  * }
  * }
  *
  * new Test().run()
  * 
- * will output :
- * 
- * 30
- * 40
- * [x:10, y:30]
- * 
- * because the x and y variables declared in the delegate shadow the 
fields in the owner class.
+ * This will succeed, because the x and y variables 

[4/5] groovy git commit: test more javadoc code examples

2016-03-05 Thread pascalschumacher
test more javadoc code examples


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

Branch: refs/heads/GROOVY_2_4_X
Commit: a9bfa54fc0c796a826a5e2fb93b5748f835a9a0d
Parents: 3d332f4
Author: pascalschumacher 
Authored: Fri Mar 4 20:57:43 2016 +0100
Committer: pascalschumacher 
Committed: Sat Mar 5 11:57:48 2016 +0100

--
 src/main/groovy/lang/TracingInterceptor.java|  2 +-
 .../groovy/transform/EqualsAndHashCode.java | 12 +
 src/main/groovy/transform/Field.java|  3 ++-
 src/main/groovy/transform/Immutable.java|  6 ++---
 src/main/groovy/transform/TailRecursive.groovy  |  3 ++-
 .../transform/builder/DefaultStrategy.java  |  6 ++---
 .../transform/builder/ExternalStrategy.java |  2 +-
 .../transform/builder/SimpleStrategy.java   |  2 +-
 src/main/groovy/util/ConfigObject.java  |  2 +-
 src/main/groovy/util/Eval.java  | 26 ++--
 .../ast/expr/ElvisOperatorExpression.java   |  2 +-
 .../groovy/runtime/ComposedClosure.java |  2 +-
 .../codehaus/groovy/runtime/CurriedClosure.java |  2 +-
 .../groovy/runtime/DefaultGroovyMethods.java|  2 +-
 .../groovy/runtime/StringGroovyMethods.java | 10 
 15 files changed, 43 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/groovy/blob/a9bfa54f/src/main/groovy/lang/TracingInterceptor.java
--
diff --git a/src/main/groovy/lang/TracingInterceptor.java 
b/src/main/groovy/lang/TracingInterceptor.java
index 5a5a1ab..f67de11 100644
--- a/src/main/groovy/lang/TracingInterceptor.java
+++ b/src/main/groovy/lang/TracingInterceptor.java
@@ -32,7 +32,7 @@ import java.io.Writer;
  * of two spaces is written.
  * 
  * Here is an example usage on the ArrayList object: 
- * 
+ * 
  * def proxy = ProxyMetaClass.getInstance(ArrayList.class)
  * proxy.interceptor = new TracingInterceptor()
  * proxy.use {

http://git-wip-us.apache.org/repos/asf/groovy/blob/a9bfa54f/src/main/groovy/transform/EqualsAndHashCode.java
--
diff --git a/src/main/groovy/transform/EqualsAndHashCode.java 
b/src/main/groovy/transform/EqualsAndHashCode.java
index c1bb954..f572549 100644
--- a/src/main/groovy/transform/EqualsAndHashCode.java
+++ b/src/main/groovy/transform/EqualsAndHashCode.java
@@ -29,7 +29,7 @@ import java.lang.annotation.Target;
  * Class annotation used to assist in creating appropriate {@code equals()} 
and {@code hashCode()} methods.
  * 
  * It allows you to write classes in this shortened form:
- * 
+ * 
  * import groovy.transform.EqualsAndHashCode
  * {@code @EqualsAndHashCode}
  * class Person {
@@ -83,7 +83,8 @@ import java.lang.annotation.Target;
  * to be used in limited cases where its purpose is for overriding 
implementation details rather than
  * creating a derived type with different behavior. This is useful when using 
JPA Proxies for example or
  * as shown in the following examples:
- * 
+ * 
+ * import groovy.transform.*
  * {@code @Canonical} class IntPair { int x, y }
  * def p1 = new IntPair(1, 2)
  *
@@ -107,7 +108,8 @@ import java.lang.annotation.Target;
  * equals and canEqual method. The easiest way to
  * achieve this would be to use the {@code @Canonical} or
  * {@code @EqualsAndHashCode} annotations as shown below:
- * 
+ * 
+ * import groovy.transform.*
  * {@code @EqualsAndHashCode}
  * {@code @TupleConstructor(includeSuperProperties=true)}
  * class IntTriple extends IntPair { int z }
@@ -159,7 +161,7 @@ import java.lang.annotation.Target;
  * 
  * There is also support for including or excluding fields/properties by name 
when constructing
  * the equals and hashCode methods as shown here:
- * 
+ * 
  * import groovy.transform.*
  * {@code @EqualsAndHashCode}(excludes="z")
  * {@code @TupleConstructor}
@@ -172,7 +174,7 @@ import java.lang.annotation.Target;
  *
  * {@code @EqualsAndHashCode}(excludes=["y", "z"])
  * {@code @TupleConstructor}
- * public class Point2D {
+ * public class Point1D {
  * int x, y, z
  * }
  *

http://git-wip-us.apache.org/repos/asf/groovy/blob/a9bfa54f/src/main/groovy/transform/Field.java
--
diff --git a/src/main/groovy/transform/Field.java 
b/src/main/groovy/transform/Field.java
index 0a89817..546d045 100644
--- a/src/main/groovy/transform/Field.java
+++ b/src/main/groovy/transform/Field.java
@@ -31,7 +31,8 @@ import java.lang.annotation.Target;
  * 
  * The annotated variable will become a private field of 

groovy git commit: test more javadoc code examples

2016-03-04 Thread pascalschumacher
Repository: groovy
Updated Branches:
  refs/heads/master c04484a66 -> 870a1bca4


test more javadoc code examples


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

Branch: refs/heads/master
Commit: 870a1bca40e1c831101c64053edee603c43b3d0e
Parents: c04484a
Author: pascalschumacher 
Authored: Fri Mar 4 20:57:43 2016 +0100
Committer: pascalschumacher 
Committed: Fri Mar 4 20:57:43 2016 +0100

--
 src/main/groovy/lang/TracingInterceptor.java|  2 +-
 src/main/groovy/transform/Canonical.groovy  |  3 ++-
 .../groovy/transform/EqualsAndHashCode.java | 12 +
 src/main/groovy/transform/Field.java|  3 ++-
 src/main/groovy/transform/Immutable.java|  6 ++---
 src/main/groovy/transform/MapConstructor.java   |  2 +-
 src/main/groovy/transform/TailRecursive.groovy  |  3 ++-
 .../transform/builder/DefaultStrategy.java  |  6 ++---
 .../transform/builder/ExternalStrategy.java |  2 +-
 .../transform/builder/SimpleStrategy.java   |  2 +-
 src/main/groovy/util/ConfigObject.java  |  2 +-
 src/main/groovy/util/Eval.java  | 26 ++--
 .../ast/expr/ElvisOperatorExpression.java   |  2 +-
 .../groovy/runtime/ComposedClosure.java |  2 +-
 .../codehaus/groovy/runtime/CurriedClosure.java |  2 +-
 .../groovy/runtime/DefaultGroovyMethods.java|  2 +-
 .../groovy/runtime/StringGroovyMethods.java | 10 
 17 files changed, 46 insertions(+), 41 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/groovy/blob/870a1bca/src/main/groovy/lang/TracingInterceptor.java
--
diff --git a/src/main/groovy/lang/TracingInterceptor.java 
b/src/main/groovy/lang/TracingInterceptor.java
index 5a5a1ab..f67de11 100644
--- a/src/main/groovy/lang/TracingInterceptor.java
+++ b/src/main/groovy/lang/TracingInterceptor.java
@@ -32,7 +32,7 @@ import java.io.Writer;
  * of two spaces is written.
  * 
  * Here is an example usage on the ArrayList object: 
- * 
+ * 
  * def proxy = ProxyMetaClass.getInstance(ArrayList.class)
  * proxy.interceptor = new TracingInterceptor()
  * proxy.use {

http://git-wip-us.apache.org/repos/asf/groovy/blob/870a1bca/src/main/groovy/transform/Canonical.groovy
--
diff --git a/src/main/groovy/transform/Canonical.groovy 
b/src/main/groovy/transform/Canonical.groovy
index 82d2fc2..6f99c80 100644
--- a/src/main/groovy/transform/Canonical.groovy
+++ b/src/main/groovy/transform/Canonical.groovy
@@ -24,7 +24,8 @@ package groovy.transform
  * which add positional constructors, equals, hashCode and a pretty print 
toString to your class.
  * 
  * You can write classes in this shortened form:
- * 
+ * 
+ * import groovy.transform.Canonical
  * {@code @Canonical} class Customer {
  * String first, last
  * int age

http://git-wip-us.apache.org/repos/asf/groovy/blob/870a1bca/src/main/groovy/transform/EqualsAndHashCode.java
--
diff --git a/src/main/groovy/transform/EqualsAndHashCode.java 
b/src/main/groovy/transform/EqualsAndHashCode.java
index 634dbe9..daab142 100644
--- a/src/main/groovy/transform/EqualsAndHashCode.java
+++ b/src/main/groovy/transform/EqualsAndHashCode.java
@@ -29,7 +29,7 @@ import java.lang.annotation.Target;
  * Class annotation used to assist in creating appropriate {@code equals()} 
and {@code hashCode()} methods.
  * 
  * It allows you to write classes in this shortened form:
- * 
+ * 
  * import groovy.transform.EqualsAndHashCode
  * {@code @EqualsAndHashCode}
  * class Person {
@@ -83,7 +83,8 @@ import java.lang.annotation.Target;
  * to be used in limited cases where its purpose is for overriding 
implementation details rather than
  * creating a derived type with different behavior. This is useful when using 
JPA Proxies for example or
  * as shown in the following examples:
- * 
+ * 
+ * import groovy.transform.*
  * {@code @Canonical} class IntPair { int x, y }
  * def p1 = new IntPair(1, 2)
  *
@@ -107,7 +108,8 @@ import java.lang.annotation.Target;
  * equals and canEqual method. The easiest way to
  * achieve this would be to use the {@code @Canonical} or
  * {@code @EqualsAndHashCode} annotations as shown below:
- * 
+ * 
+ * import groovy.transform.*
  * {@code @EqualsAndHashCode}
  * {@code @TupleConstructor(includeSuperProperties=true)}
  * class IntTriple extends IntPair { int z }
@@ -159,7 +161,7 @@ import java.lang.annotation.Target;
  * 
  * There is also support for including or excluding