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.

SubjectObserverProtocolImpl.java 896B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. Copyright (c) Xerox Corporation 1998-2002. All rights reserved.
  3. Use and copying of this software and preparation of derivative works based
  4. upon this software are permitted. Any distribution of this software or
  5. derivative works must comply with all applicable United States export control
  6. laws.
  7. This software is made available AS IS, and Xerox Corporation makes no warranty
  8. about the software, its performance or its conformity to any specification.
  9. */
  10. package observer;
  11. import java.util.Vector;
  12. aspect SubjectObserverProtocolImpl extends SubjectObserverProtocol {
  13. declare parents: Button implements Subject;
  14. public Object Button.getData() { return this; }
  15. declare parents: ColorLabel implements Observer;
  16. public void ColorLabel.update() {
  17. colorCycle();
  18. }
  19. pointcut stateChanges(Subject s):
  20. target(s) &&
  21. call(void Button.click());
  22. }