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.

PR339.java 365B

12345678910111213141516
  1. public class PR339 {
  2. public static void main(String[] args) {
  3. new MemberInitSet().foo();
  4. org.aspectj.testing.Tester.check(true, "compiled");
  5. }
  6. }
  7. class MemberInitSet {
  8. String s = "S";
  9. { s="s"; }
  10. void foo() { s = "asdf"; }
  11. }
  12. aspect Setter pertarget(target(MemberInitSet)) {
  13. pointcut allSets(): set(String MemberInitSet.s);
  14. }