문제

I already have defined a DSL in Groovy. Now I'm working on the Eclipse integration so that I have auto completion and other fancy stuff.

This doesn't work:

method name:"myMethod", params : [param1: MyClass]

This works:

method name:"myMethod", params : [param1: java.util.Random] 

How can I use MyClass as a type for one of my parameters?

MyClass is a Groovy class in the normal package tree. I have tried it with another classes and interfaces which are defined in the DSDL itself. Then it works.

도움이 되었습니까?

해결책

I believe you need to put the fully qualified class name as a String as shown a page or so down from here

So:

method name:"myMethod", params : [param1: MyClass]

Should be:

method name:"myMethod", params : [param1: "my.package.MyClass"]
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top