Explorar el Código

194314: moved to 164

tags/pre268419
aclement hace 15 años
padre
commit
377069ffe1

+ 0
- 4
tests/bugs163/pr194314/IService.java Ver fichero

@@ -1,4 +0,0 @@

public interface IService {
void method(long l) throws Exception;
}

+ 0
- 8
tests/bugs163/pr194314/Main.java Ver fichero

@@ -1,8 +0,0 @@

public class Main {

public static void main(String[] args) throws Exception {
IService service = new Service();
service.method(42L);
}
}

+ 0
- 7
tests/bugs163/pr194314/Service.java Ver fichero

@@ -1,7 +0,0 @@

public class Service implements IService {

public void method(long l) throws Exception {
System.err.println("Original impl of service method, arg " + l);
}
}

+ 0
- 17
tests/bugs163/pr194314/ServiceInterceptor.java Ver fichero

@@ -1,17 +0,0 @@

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;

@Aspect
public class ServiceInterceptor {

@Around("execution(void test.Service.method(long))")
public void method(ProceedingJoinPoint pjp) throws Throwable {
Object[] args = pjp.getArgs();
long id = (Long) args[0];
System.out.println("in advice, arg = " + id + " (before proceed)");
pjp.proceed(pjp.getArgs());
System.out.println("in advice (after proceed)");
}
}

+ 0
- 15
tests/bugs163/pr194314/ServiceInterceptorCodeStyle.java Ver fichero

@@ -1,15 +0,0 @@

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;

public aspect ServiceInterceptorCodeStyle {

void around(): execution(void Service.method(long)) {
Object[] args = thisJoinPoint.getArgs();
long id = (Long) args[0];
System.out.println("in advice, arg = " + id + " (before proceed)");
proceed();
System.out.println("in advice (after proceed)");
}
}

Cargando…
Cancelar
Guardar