castFromPrimitive(right.getType());
}
store(RIGHT_OPERAND, rightType);
Label shortcutEvaluation = new Label();
BooleanOperator operation = singleCondition.getOperation();
prepareLeftOperand(operation, type, leftType, rightType, shortcutEvaluation);
prepareRightOperand(right, type, rightType, shortcutEvaluation);
load(LEFT_OPERAND);
load(RIGHT_OPERAND);
switch (operation) {
case CONTAINS:
if (leftType == String.class && CharSequence.class.isAssignableFrom(rightType)) {
invokeVirtual(String.class, "contains", boolean.class, CharSequence.class);
} else {
invokeStatic(EvaluatorHelper.class, "contains", boolean.class, Object.class, rightType.isPrimitive() ? rightType : Object.class);
}
break;
case MATCHES:
invokeVirtual(type, "matches", boolean.class, String.class);
break;
case SOUNDSLIKE:
invokeStatic(EvaluatorHelper.class, "soundslike", boolean.class, String.class, String.class);
break;
default:
if (operation.isEquality() && type != BigDecimal.class) {
if (type.isInterface()) {
invokeInterface(type, "equals", boolean.class, Object.class);
} else {
invokeVirtual(type, "equals", boolean.class, Object.class);
}