|
|
|
Groovy should behave more consistently across these cases now - just be warned that you can still only have legal Java identifier names between the quotes.
It would be interesting to have a way of handling method name mangling, e.g. so 'my method' went to 'my$method' or '$$my$space$method' in the Java bytecode. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
class StringMethodName { Integer 'flob'() {} def 'foo'() {} // blows private boolean 'fooBoolean'() { false } public int 'fooInt'() { 1 } public def 'fooDef'() {} }Seems like quoted method names only work for those methods that
a) have an access modifier
b) return a non-primitive, non-def value