Annotate anonymous inner class

后端 未结 3 1843
臣服心动
臣服心动 2021-01-07 16:37

Is there a way to annotate an anonymous inner class in Java?

In this example could you add a class level annotation to Class2?

public void method1()          


        
3条回答
  •  春和景丽
    2021-01-07 17:00

    Not yet. This feature is suggested by JSR 308, and may be included in future versions of Java.

提交回复
热议问题