Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

AroundReturnType.java 529B

1234567891011121314151617181920212223242526
  1. public class AroundReturnType {
  2. public static void main(String[] args){
  3. new AroundReturnType().go();
  4. }
  5. void go(){
  6. System.out.println("... "+ s() );
  7. }
  8. static Integer s() {
  9. return new Integer(1);
  10. }
  11. }
  12. aspect A {
  13. void around(): within(AroundReturnType) && call(Integer AroundReturnType.s()){
  14. System.out.println("s - advice");
  15. proceed();
  16. }
  17. Integer around(): within(AroundReturnType) && execution(* *(..)) {
  18. proceed();
  19. return new Integer(3);
  20. }
  21. }