e.printStackTrace();
}
}
public void simpleTest() {
DefaultBeforeAfterAdvice a = new PrintoutAspect();
// apply aspect to one method
// a.install(
// SimpleTarget.class,
// "public .* doIt.*" );
a.installAroundExecution(
// Reflection.getInnerClassOf( "SimpleInner", SimpleTarget.class ),
SimpleTarget.class,
new PointcutFactory().addMethodName( "doIt" ).
// addParamTypeList(
// double.class, int.class, long.class, boolean[].class ).
addParamTypeList(
double.class, ArrayList.class).
getPattern() );
SimpleTarget t = new SimpleTarget();
t.catchMe( "i am the argument" );
a.deinstall( SimpleTarget.class );
// a.deinstall( Reflection.getInnerClassOf( "SimpleInner", SimpleTarget.class ) );
t.catchMe( "i am the argument" );
}