final JCFieldAccess fa = (JCFieldAccess) ifExp;
final boolean accessible = isAccessible(fa, cut, n);
if (!accessible) {
Symbol s = rs.getSymbol(ifExp, cut, n);
reflect(s, cut, n, null, encBlock);
final JCExpression accessor;
if (s.isStatic()) {
accessor = tm.Literal(StringUtils.EMPTY);
} else {
accessor = fa.selected;
}
ifExp = getReflectedAccess(fa, cut, n, null, accessor);
reflectionInjected = true;
}
} else if (ifExp instanceof JCMethodInvocation) {
JCMethodInvocation mi = (JCMethodInvocation) ifExp;
final MethodSymbol mSym = rs.getSymbol(mi, cut, n);
if (!mi.args.isEmpty()) {
for (JCExpression arg : mi.args) {
JCExpression newArg = processCond(arg, cut, n, encBlock);
if (!newArg.equals(arg)) {
mi.args = Resolver.injectBefore(arg, mi.args, true, newArg);
}
}
}
Symbol accSym = rs.getInvokationTarget(mi, cut, n);
final boolean accessible = isAccessible(mSym, accSym, cut, n);
if (!accessible) {
ifExp.type = mSym.getReturnType();
reflect(mSym, cut, n, mi.args, encBlock);
JCExpression accessor = rs.getInvokationExp(mi, cut, n);
ifExp = getReflectedAccess(mSym, cut, accessor, mi.args, n);
methodInjected = true;
} else {
ifExp.type = mSym.getReturnType();
}
} else if (ifExp instanceof JCNewClass) {
JCNewClass init = (JCNewClass) ifExp;
Symbol initSym = rs.getSymbol(ifExp, cut, n);
if (!init.args.isEmpty()) {
for (JCExpression arg : init.args) {
JCExpression newArg = processCond(arg, cut, n, encBlock);
if (!newArg.equals(arg)) {
init.args = rs.injectBefore(arg, init.args, true, newArg);
}
}
}
final boolean accessible = isAccessible(initSym, initSym.enclClass(), cut, n);