I have an annotation that receives a \"dynamic\" parameter according to this idiom, i.e. a parameter of an interface type. In short:
public interface MyInterface
During annotation processing, in the general case it is not possible to construct an instance of any class being compiled. Remember that annotation processing runs inside the compiler, as a part of a multi-step process. There's no guarantee that a class and all its dependencies are actually compiled and ready to class-load at the time your annotation processor is executing.
Note also that your annotation declaration is invalid. Section 9.6.1 of the Java language specification lists the valid types of annotation elements, and a value of an user-defined interface is not one of them. At best what you can have is a Class extends MyInterface>
, but then you have the same issues about how to instantiate it.
It sounds like your use case for annotation processing is very specialized. It would probably help if you opened a new question about the actual problem you're trying to solve, since there may be a better way to solve it than this.