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

Dynamic parsing of interdependent classes

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Critical
    • Resolution: Won't Fix
    • 2.1.6
    • None
    • Compiler
    • All

    Description

      I don't see any way that you can dynamically compile two (or more) interdependent classes via GroovyClassLoader.parse(String).

      E.g.
      abstract class A extends B
      {
      }
      class B
      {
      void aMethod(A a)
      }

      Parsing A first complains about not finding B.
      Parsing B first complains about not finding A.

      Perhaps there should be a batch method to compile multiple source text Collection<String> etc. that internally works out the correct order to do it and returns compiled classes.

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            dfht Darren Hurt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: