Я хотел бы сопоставить некоторые действия в дочернем классе с их суперклассом, но я не могу понять это. Пример ниже...
abstract class A {
abstract def foo()
def aAction1 = {
// do something
render(view: '/someView')
}
def aAction2 = {
SomeObject someObject ->
// do something
render(view: '/someView2')
}
}
class B extents A {
def foo() { return "Hello World" }
# map to parent action
# works fine
def jump = super.&aAction1
# doesnt work ... Why? and can I make it work?
def swim = { SomeObject someObject ->
super.aAction2(someObject)
}
}
Любые идеи по этому поводу? Спасибо.
java.lang.InstantiationException at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30)
- person ekawas   schedule 05.10.2011