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 -

google shop client API returns 400 bad request error while adding an item -