Ver código fonte

autoboxing for return values

tags/Root_AspectJ5_Development
aclement 19 anos atrás
pai
commit
7a04b2f94b
1 arquivos alterados com 31 adições e 0 exclusões
  1. 31
    0
      tests/java5/autoboxing/AspectAfterReturning.aj

+ 31
- 0
tests/java5/autoboxing/AspectAfterReturning.aj Ver arquivo

@@ -0,0 +1,31 @@
public aspect AspectAfterReturning {
after() returning(int i): call(* ret*(..)) {
System.err.println("Returning I="+i);
}
after() returning(Integer i): call(* ret*(..)) {
System.err.println("Returning Integer="+i);
}
after() returning(Object i): call(* ret*(..)) {
System.err.println("Returning Object="+i);
}
public static void main(String []argv) {
retI();
retInteger();
}
public static int retI() {
return 5;
}
public static Integer retInteger() {
return new Integer(10);
}
}

Carregando…
Cancelar
Salvar