Hello Users
I am trying to use the builder annotation and am seeing compile errors. I
am not sure if I am doing something wrong
package com.my.builder
>
> import groovy.transform.builder.Builder
>
> @Builder(builderClassName = "MyBuilder")
> class NoMembers {
> private int privateInt;
> public int publicInt;
> static int staticInt = 1;
> }
>
> class MyOtherClass {
> public boolean containsValidFieldValues(List<Integer>
> expectedFieldValues) {
> new NoMembers.MyBuilder().build()
> }
> }
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
failed:
14: unable to resolve class NoMembers.MyBuilder
@ line 14, column 9.
new NoMembers.MyBuilder().build()
^
I am using this single line to compile
> GroovyClassLoader().parseClass(File("testdata/plugins/Builder.groovy"))
It looks like the builder annotation is adding a new class and this happens
after the resolver caused the compile error. Any help is appreciated.
regards
Saravanan