I am working on annotations, and I keep getting this message "Cannot instantiate the type AnnotationConfiguration". Can you clarify what this means and how I can resolve this?
I am working on annotations, and I keep getting this message "Cannot instantiate the type AnnotationConfiguration". Can you clarify what this means and how I can resolve this?
When creating an instance of an Annotation you have to specify all "attributes" as methods and add an annotationType method.
AnnotationConfiguration annotation = new AnnotationConfiguration()
{
@Override
public String value()
{
return "example";
}
@Override
public Class<? extends Annotation> annotationType()
{
return AnnotationConfiguration.class;
}
};