groovy - Cannot use type @TypeChecked and constructor -


i have class:

class myclass{    string mystring1    string mystring2 } 

i do:

myclass myclass = new myclass(mystring1: "1", mystring2: "2") 

however, cannot in method typechecked. ideas?

@typechecked void mymethod() {     ...     myclass myclass = new myclass(mystring1: "1", mystring2: "2")     ... } 

i get:

[static type checking] - cannot find matching method myclass#<init>(java.util.map 

any ideas?

should be:

@typechecked void mymethod() {     //or def myclass     myclass myclass = new myclass(mystring1: "1", mystring2: "2") } 

btw version of groovy being used?


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

android - IBM Worklight 6.1 [Application Error] There was a network error (file:///android_asset/www/index.html) -