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.

RemoveAnnotation.java 338B

1234567891011121314151617181920
  1. package test5;
  2. @interface RemoveAnno1 {}
  3. @interface RemoveAnno2 {
  4. int foo() default 3;
  5. }
  6. @RemoveAnno1 public class RemoveAnnotation {
  7. @RemoveAnno1 @RemoveAnno2(foo=4)
  8. int foo() { return 1; }
  9. @RemoveAnno2
  10. int bar() { return 2; }
  11. @RemoveAnno1
  12. int baz = 10;
  13. public int run() { return foo() + bar(); }
  14. }