How to create an instance out of a TypeMirror

后端 未结 2 394
Happy的楠姐
Happy的楠姐 2021-01-28 03:38

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         


        
2条回答
  •  难免孤独
    2021-01-28 04:03

    There was an answer by Will Lp that he deleted because it was related to Groovy and not to Java.

    I do, however, think that it is relevant nonetheless.

    When using Groovy you can actually pass a closure as a class parameter to an annotation.

提交回复
热议问题