Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: groovy-runtime
    • Labels:
      None

      Description

      We should make it possible to implement any Java interface with method missing:

      class Foo {
          def methodMissing(String name, args) { null }
      }
      
      def f = new Foo()
      def ctx = f as SomeInterface
      

      The proxy would simply delegate from the interface through methodMissing

        Activity

        Graeme Rocher created issue -
        Guillaume Delcroix made changes -
        Field Original Value New Value
        Fix Version/s 1.7-beta-x [ 15538 ]
        Fix Version/s 1.7-beta-1 [ 14014 ]
        scardis made changes -
        Attachment GroovyInterfaceTests.groovy [ 45423 ]
        Jochen Theodorou made changes -
        Fix Version/s 1.8.x [ 15750 ]
        Fix Version/s 1.7.x [ 15538 ]
        Fix Version/s 2.x [ 17013 ]
        Jochen Theodorou made changes -
        Fix Version/s 1.8.x [ 15750 ]
        Jochen Theodorou made changes -
        Summary Add support for implementing a Java interface with methodMissing @Mixin should create method stubs
        Jochen Theodorou made changes -
        Parent GROOVY-5990 [ 144083 ]
        Issue Type New Feature [ 2 ] Sub-task [ 7 ]
        Jochen Theodorou made changes -
        Component/s groovy-runtime [ 16250 ]
        Pascal Schumacher made changes -
        Fix Version/s 2.x [ 17013 ]
        Pascal Schumacher made changes -
        Resolution Won't Fix [ 2 ]
        Status Open [ 1 ] Closed [ 6 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12732277 ] Default workflow, editable Closed status [ 12744105 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12970127 ] Default workflow, editable Closed status [ 12977897 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Graeme Rocher
          • Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development