I updated test classes CtClassBuilder, CtMethodBuilder and CtFieldBuilder so that tests can create annotations with elements.
Example:
// Creates a test class with an empty annotation:
// @MyAnnotation
// class Test { }
CtClassBuilder.create().name("japicmp.Test").withAnnotation("japicmp.MyAnnotation");
// Creates a test class with an annotation that contains one element:
// @MyAnnotation(foo = 1000)
// class Test { }
CtClassBuilder.create().name("japicmp.Test").withAnnotation("japicmp.MyAnnotation", new CtElement("foo", 1000));
This allows for test scenarios where compatibility change ANNOTATION_MODIFIED should be reported.
I updated test classes
CtClassBuilder
,CtMethodBuilder
andCtFieldBuilder
so that tests can create annotations with elements.Example:
This allows for test scenarios where compatibility change
ANNOTATION_MODIFIED
should be reported.Closes #385