You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
903 B
32 lines
903 B
package testdata;
|
|
|
|
import java.lang.annotation.Retention;
|
|
import java.lang.annotation.RetentionPolicy;
|
|
|
|
@Annotated.Marker(a = "on class", b = {"A", "B", "C" },
|
|
c = @Annotated.Nested(e="E1", f=1695938256, g=7264081114510713000L),
|
|
d = { @Annotated.Nested(e="E2", f=1695938256, g=7264081114510713000L) })
|
|
public class Annotated {
|
|
|
|
@Annotated.Marker(a="on field")
|
|
public String field;
|
|
|
|
@Annotated.Marker(a="on method")
|
|
public void method(String a, @Annotated.Marker(a="on parameter") String b) {}
|
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
public @interface Marker {
|
|
String a() default "";
|
|
String[] b() default {};
|
|
Nested c() default @Nested;
|
|
Nested[] d() default {};
|
|
}
|
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
public @interface Nested {
|
|
String e() default "";
|
|
int f() default 0;
|
|
long g() default 0L;
|
|
}
|
|
}
|