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.
13 lines
314 B
13 lines
314 B
package pkg;
|
|
|
|
import java.lang.annotation.*;
|
|
|
|
class TestMemberAnnotations {
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
@interface A { String value() default ""; }
|
|
|
|
@A("const") public static final int CONST = 42;
|
|
@A("field") private int f;
|
|
|
|
@A("return") private int f(@A("arg") int i) { return i + f + CONST; }
|
|
} |