final ClassLoader loader = context.getLoader();
ClassInfo classInfo = AsmClassInfo.getClassInfo(bytecode, loader);
final Set definitions = context.getDefinitions();
final ExpressionContext[] ctxs = new ExpressionContext[]{
new ExpressionContext(PointcutType.EXECUTION, classInfo, classInfo),
new ExpressionContext(PointcutType.CALL, null, classInfo),
new ExpressionContext(PointcutType.GET, classInfo, classInfo),
new ExpressionContext(PointcutType.SET, classInfo, classInfo),
new ExpressionContext(PointcutType.HANDLER, classInfo, classInfo),
new ExpressionContext(PointcutType.STATIC_INITIALIZATION, classInfo, classInfo),
new ExpressionContext(PointcutType.WITHIN, classInfo, classInfo)
};
if (classFilter(definitions, ctxs, classInfo)) {
return;
}
// build the ClassInfo from the bytecode to avoid loading it from the loader resource stream later
// to support stub weaving
AsmClassInfo.getClassInfo(bytecode, loader);
// compute CALL + GET/SET early matching results to avoid registering useless visitors
final boolean filterForCall = classFilterFor(
definitions, new ExpressionContext[]{
new ExpressionContext(PointcutType.CALL, null, classInfo),
new ExpressionContext(PointcutType.WITHIN, classInfo, classInfo)
}
);//FIXME - within make match all
final boolean filterForGetSet = classFilterFor(
definitions, new ExpressionContext[]{
new ExpressionContext(PointcutType.GET, classInfo, classInfo),
new ExpressionContext(PointcutType.SET, classInfo, classInfo),
new ExpressionContext(PointcutType.WITHIN, classInfo, classInfo)
}
);//FIXME - within make match all
final boolean filterForHandler = classFilterFor(
definitions, new ExpressionContext[]{
new ExpressionContext(PointcutType.HANDLER, null, classInfo),
new ExpressionContext(PointcutType.WITHIN, classInfo, classInfo)
}
);//FIXME - within make match all
// prepare ctor call jp
final ClassReader crLookahead = new ClassReader(bytecode);