Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8242

Javadoc for Newify is missing some attribute values

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.4.13
    • None
    • None

    Description

      I was looking at thw Newify AST transform. Some of the Javadoc appears incorrect since the annotation requires a value.

       * or this ("Ruby-style"):
       * <pre>
       * {@code @Newify} class MyTreeProcessor {  --  Is this supposed to be @Newify([Tree,Leaf])?
       *     def myTree = Tree.new(Tree.new(Leaf.new("A"), Leaf.new("B")), Leaf.new("C"))
       *     def process() { ... }
       * }
       * </pre>
      
       * An example showing how to use the annotation at different levels:
       * <pre>
       * {@code @Newify(auto=false, value=Foo)}
       * class Main {
       *     {@code @Newify} // turn auto on for field  --  Is this supposed to be @Newify(BigInteger)?
       *     def field1 = java.math.BigInteger.new(42)
       *     def field2, field3, field4
       *
       *     {@code @Newify(Bar)}
       *     def process() {
       *         field2 = Bar("my bar")
       *     }
       *
       *     {@code @Newify(Baz)}
       *     Main() {
       *         field3 = Foo("my foo")
       *         field4 = Baz("my baz")
       *     }
       * }
       * </pre>
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jwagenleitner John Wagenleitner
            emilles Eric Milles
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment