Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Comparable to GROOVY-1439 I think about a map where each key represents a method name and each value a closure that is called for the method of the interface.
example:
interface Foo {
def aMethod();
}
def myImplementation = [aMethod:
{1}] as Foo
assert myImplementation instanceof Foo
assert myImplementation.aMethod() == 1