I have a Class<? extends Annotation> and tried calling newInstance() but Java yelled at me for the obvious reason that I can’t instantiate an interface. But I know frameworks like EasyMock are perfectly capable of instantiating interfaces. What would it take to get a completely dumb Annotation instance out of my Class?
I have a Class<? extends Annotation> and tried calling newInstance() but Java yelled at
Share
Mock frameworks do not instantiate interfaces, they build classes that implement them on the fly at runtime. You may find this javadoc enlightening for what you want to do!