public void edit(NewExpr e) throws CannotCompileException {
try {
put(e.getConstructor().getDeclaringClass().getName() + "." + "<init>" +
"(" + parameterNames(e.getConstructor().getMethodInfo()) + ")", e.getLineNumber(), key);
} catch (NotFoundException e1) {
throw new ReflectionsException("Could not find new instance usage in " + key, e1);
}
}
@Override
public void edit(MethodCall m) throws CannotCompileException {
try {
put(m.getMethod().getDeclaringClass().getName() + "." + m.getMethodName() +
"(" + parameterNames(m.getMethod().getMethodInfo()) + ")", m.getLineNumber(), key);
} catch (NotFoundException e) {
throw new ReflectionsException("Could not find member " + m.getClassName() + " in " + key, e);
}
}
@Override
public void edit(ConstructorCall c) throws CannotCompileException {
try {
put(c.getConstructor().getDeclaringClass().getName() + "." + "<init>" +
"(" + parameterNames(c.getConstructor().getMethodInfo()) + ")", c.getLineNumber(), key);
} catch (NotFoundException e) {
throw new ReflectionsException("Could not find member " + c.getClassName() + " in " + key, e);
}
}
@Override
public void edit(FieldAccess f) throws CannotCompileException {
try {
put(f.getField().getDeclaringClass().getName() + "." + f.getFieldName(), f.getLineNumber(), key);
} catch (NotFoundException e) {
throw new ReflectionsException("Could not find member " + f.getFieldName() + " in " + key, e);
}
}
});
}