Refine the annotation Groovydoc
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/ce126090 Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/ce126090 Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/ce126090 Branch: refs/heads/master Commit: ce12609009c6572247d8d194047aac6812753b92 Parents: 5594f29 Author: sunlan <[email protected]> Authored: Mon Apr 10 23:58:37 2017 +0800 Committer: sunlan <[email protected]> Committed: Mon Apr 10 23:58:37 2017 +0800 ---------------------------------------------------------------------- src/main/groovy/lang/Groovydoc.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/groovy/blob/ce126090/src/main/groovy/lang/Groovydoc.java ---------------------------------------------------------------------- diff --git a/src/main/groovy/lang/Groovydoc.java b/src/main/groovy/lang/Groovydoc.java index d27dfcb..bd21ce7 100644 --- a/src/main/groovy/lang/Groovydoc.java +++ b/src/main/groovy/lang/Groovydoc.java @@ -1,15 +1,20 @@ package groovy.lang; +import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * Store the groovydoc for the annotated elements + * An annotation to hold the groovydoc for the annotated element at runtime, we can it "Runtime Groovydoc". + * Runtime Groovydoc is a bit like Python's Documentation Strings and will be useful for IDE and developers who set a high value on documentations. * - * Created by Daniel on 2017/4/9. + * The usage is very simple, just place @Groovydoc at the beginning of the content of groovydoc, then the new parser Parrot will attach the annotation Groovydoc automatically + * + * @since 3.0.0 */ +@Documented @Target({ElementType.TYPE, ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR}) @Retention(RetentionPolicy.RUNTIME) public @interface Groovydoc {
