m_joinPointIndex = TransformationUtil.getJoinPointIndex(klass.getCtClass());
for (Iterator it = m_definitions.iterator(); it.hasNext();) {
final SystemDefinition definition = (SystemDefinition)it.next();
final CtClass ctClass = klass.getCtClass();
final ClassMetaData classMetaData = JavassistMetaDataMaker.createClassMetaData(ctClass);
if (classFilter(definition, classMetaData, ctClass)) {
return;
}
ctClass.instrument(
new ExprEditor() {
public void edit(Handler handlerExpr) throws CannotCompileException {
try {
CtClass exceptionClass = null;
try {
exceptionClass = handlerExpr.getType();
}
catch (NullPointerException e) {
return;
}
CtBehavior where = null;
try {
where = handlerExpr.where();
}
catch (RuntimeException e) {
// <clinit> access leads to a bug in Javassist
where = ctClass.getClassInitializer();
}
MethodMetaData methodMetaData = null; //JavassistMetaDataMaker.createMethodMetaData(...);
ClassMetaData exceptionClassMetaData = JavassistMetaDataMaker.createClassMetaData(
exceptionClass
);
// TODO: NO filtering on class and method is done (only exception class), needs to be implemented