handle binary operator case

This commit is contained in:
金戟 2020-06-04 00:22:04 +08:00
parent 48993d7f18
commit 738f2fc431

View File

@ -62,6 +62,16 @@ public class EnableTestableInjectTranslator extends BaseTranslator {
super.visitSelect(jcFieldAccess);
}
/**
* member() + new Demo() -> n.e.f(this, "member") + n.e.w(Demo.class)
*/
@Override
public void visitBinary(JCBinary jcBinary) {
jcBinary.lhs = checkAndExchange(jcBinary.lhs);
jcBinary.rhs = checkAndExchange(jcBinary.rhs);
super.visitBinary(jcBinary);
}
/**
* For member method invocation break point
* call(new Demo()) -> call(n.e.w(Demo.class))