if (TransformUtil.same(ltb, String.class)
&& node.getOperator() == Operator.PLUS_ASSIGN) {
if (lhs instanceof ArrayAccess) {
ArrayAccess aa = (ArrayAccess) lhs;
hardDep(aa.getArray().resolveTypeBinding());
aa.getArray().accept(this);
print("->set(");
aa.getIndex().accept(this);
print(", ");
} else {
lhs.accept(this);
print(" = ");
}
print("::java::lang::StringBuilder(");
lhs.accept(this);
print(").append(");
castNull(rhs);
print(")->toString()");
if (lhs instanceof ArrayAccess) {
print(")");
}
hardDep(ctx.resolve(StringBuilder.class));
return false;
}
if (node.getOperator() == Operator.RIGHT_SHIFT_UNSIGNED_ASSIGN) {
lhs.accept(this);
print(" = ");
if (ltb.getName().equals("long")) {
print("static_cast<uint64_t>(");
} else {
print("static_cast<uint32_t>(");
}
lhs.accept(this);
print(") >> ");
rhs.accept(this);
return false;
}
if (node.getOperator().equals(Operator.REMAINDER_ASSIGN)) {
if (ltb.getName().equals("float") || ltb.getName().equals("double")) {
fmod = true;
lhs.accept(this);
print(" = ");
print("std::fmod(");
lhs.accept(this);
print(", ");
lhs.accept(this);
print(")");
return false;
}
}
if (node.getOperator() == Operator.ASSIGN
&& lhs instanceof ArrayAccess
&& !((ArrayAccess) lhs).getArray().resolveTypeBinding()
.getComponentType().isPrimitive()) {
ArrayAccess aa = (ArrayAccess) lhs;
hardDep(aa.getArray().resolveTypeBinding());
aa.getArray().accept(this);
print("->set(");
aa.getIndex().accept(this);
print(", ");
rhs.accept(this);
print(")");
return false;
}