Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

VisiblePrivateInterfaceITDs.java 541B

123456789101112131415161718192021222324
  1. // PR 52928
  2. public class VisiblePrivateInterfaceITDs {
  3. public static void main(String[] args) {
  4. VisiblePrivateInterfaceITDs s = new VisiblePrivateInterfaceITDs();
  5. s.aMethod();
  6. }
  7. public void aMethod() {
  8. // x is introduced by the following aspect as private
  9. // so it should not be accessible here
  10. System.out.println("I have " + x); // CE 13
  11. }
  12. }
  13. aspect SampleAspect {
  14. private interface Tag {};
  15. private int Tag.x = 0;
  16. declare parents: VisiblePrivateInterfaceITDs implements Tag;
  17. }