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

Improve docs for invokeMethod

    XMLWordPrintableJSON

    Details

    • Type: Documentation
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.5
    • Fix Version/s: 2.4.11
    • Component/s: Documentation
    • Labels:
      None

      Description

      I was reading meta programming documentation when I noticed that "this method is called when the method you called is not present on a Groovy object"

      As per the diagram it is incorrect. It is invoked when methodMissing is not present. This statement is as per the diagram.

      Also as per the answer at this is not an appropriate example http://stackoverflow.com/questions/19220370/what-is-the-difference-between-invokemethod-and-methodmissing

      Saying this because the answer by blackdrag (who I understand is a core committer to groovy) says that methodMissing should be used instead.

      Also the same page mentions "overhead of invokeMethod". It would be nic e to have a better explanation in the section of invokeMethod itself.

      I am not knowledgeable about this so cannot suggest what can be added. But it would be better to have the explanation in the official docs.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jwagenleitner John Wagenleitner
                Reporter:
                anshbansal Aseem Bansal
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: