|
Relates :
|
The following code should generate RuntimeVisibleTypeAnnotations attributes the method m, annotating the new instruction as well as the constructor invocation.
import java.lang.annotation.*;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE_USE)
@interface X {}
interface Foo<T> {}
class Test { void m() { new Foo<@X String>() {}; } }
At present, neither are generated.