String[] processImplicitConstraints(String expr, AtomicExprDescr atomicExpr, ConstraintConnectiveDescr parent, int parentIdx, MVELDumperContext context) {
boolean hasQuotes = expr.indexOf('"') >= 0;
String[] constrAndExpr = new String[] { "", expr };
int sharpPos = hasQuotes ? indexOfOutOfQuotes(expr, '#') : expr.indexOf('#');
int nullSafePos = hasQuotes ? indexOfOutOfQuotes(expr, "!.") : expr.indexOf("!.");
int j = 0;
while (sharpPos > 0 || nullSafePos > 0) {
if ( nullSafePos < 0 || ( sharpPos > 0 && sharpPos < nullSafePos ) ) {
String[] castAndExpr = processInlineCast(expr, atomicExpr, parent, context, sharpPos, parentIdx, j++);
expr = castAndExpr[1];
constrAndExpr = new String[] { constrAndExpr[0] + castAndExpr[0], expr };
} else {
String[] nullCheckAndExpr = processNullSafeDereferencing(expr, atomicExpr, parent, nullSafePos, parentIdx, j++ );
expr = nullCheckAndExpr[1];
constrAndExpr = new String[] { constrAndExpr[0] + nullCheckAndExpr[0], expr };
}
sharpPos = hasQuotes ? indexOfOutOfQuotes(expr, '#') : expr.indexOf('#');
nullSafePos = hasQuotes ? indexOfOutOfQuotes(expr, "!.") : expr.indexOf("!.");
}
return new String[] { constrAndExpr[0], processInferredCast(constrAndExpr[1], atomicExpr, context) };
}