You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2015/10/11 21:33:52 UTC

incubator-groovy git commit: GROOVY-7603: Update groovy docs for Category

Repository: incubator-groovy
Updated Branches:
  refs/heads/master a9c819c1c -> b889ba1b6


GROOVY-7603: Update groovy docs for Category

@Mixin is deprecated, so delete @Mixin example in Category java doc


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

Branch: refs/heads/master
Commit: b889ba1b69fba30823774021e31fe6a2a63b4b4e
Parents: a9c819c
Author: pascalschumacher <pa...@gmx.net>
Authored: Sun Oct 11 21:33:38 2015 +0200
Committer: pascalschumacher <pa...@gmx.net>
Committed: Sun Oct 11 21:33:38 2015 +0200

----------------------------------------------------------------------
 src/main/groovy/lang/Category.java | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/b889ba1b/src/main/groovy/lang/Category.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/lang/Category.java b/src/main/groovy/lang/Category.java
index 952ea91..4463a4d 100644
--- a/src/main/groovy/lang/Category.java
+++ b/src/main/groovy/lang/Category.java
@@ -57,8 +57,7 @@ import java.lang.annotation.Target;
  * references again!)
  * <p>
  * Classes conforming to the conventional Groovy category conventions can be used
- * within {@code use} statements or mixed in at compile time with the {@code @Mixin}
- * transformation or at runtime with the {@code mixin} method on classes.
+ * within {@code use} statements or mixed in at runtime with the {@code mixin} method on classes.
  * <p>
  * An example showing a {@code use} statement (allowing fine-grained application of
  * the category methods):
@@ -74,7 +73,7 @@ import java.lang.annotation.Target;
  *     assert 25.triple() == 75
  * }
  * </pre>
- * Or, using the {@code @Mixin} flavor for compile-time "mixing in" of the methods:
+ * Or, "mixing in" your methods at runtime:
  * <pre>
  * {@code @Category}(List)
  * class Shuffler {
@@ -85,26 +84,15 @@ import java.lang.annotation.Target;
  *     }
  * }
  *
- * {@code @Mixin}(Shuffler)
  * class Sentence extends ArrayList {
  *     Sentence(Collection initial) { super(initial) }
  * }
+ * Sentence.mixin Shuffler
  *
  * def words = ["The", "quick", "brown", "fox"]
  * println new Sentence(words).shuffle()
  * // => [quick, fox, The, brown]       (order will vary)
  * </pre>
- * Or, instead of using {@code @Mixin}, try "mixing in" your methods at runtime:
- * <pre>
- * // ... as before ...
- *
- * class Sentence extends ArrayList {
- *     Sentence(Collection initial) { super(initial) }
- * }
- * Sentence.mixin Shuffler
- *
- * // ... as before ...
- * </pre>
  *
  * @author Alex Tkachman
  */