AspectJ를 사용하여 웜홀 패턴을 구현 한 예를 찾고있다. Guice AOP가이를 구현할 수있는 능력이 있다면 관심이있다.AspectJ를 사용하여 웜홀 패턴 구현하기
웜 홀은 본질적으로는 예를 들어 통화 흐름에 따라 추가 매개 변수를 전달할 수 있습니다 :
// say we have
class foo {
public int m0 int a, int b) {
return m1(a,b);
}
public int m1 int a, int b) {
return m2(a,b);
}
public int m2 int a, int b) {
return a+b;
}
}
// and I wanted in a non-invasive manner to pass a third parameter of type
class context {
String userName;
long timeCalled;
String path;
}
// I could use an advise to say print the context information
// to trace what was going on without mucking up my method signatures
나는이 램니 바스 라 다드 액션에서 그의 책 AspectJ를 그러한 예를 가지고 있다고 생각합니다.
미리 감사드립니다.
많은 감사가 @kriegaex을 ... 나는 책 – user1172468