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
Post a Comment