@Override public String toStringAST() { if (this.children.length < 2) { // unary plus return "+" + getLeftOperand().toStringAST(); } return super.toStringAST(); }
@Override public String toStringAST() { if (this.children.length < 2) { // unary minus return "-" + getLeftOperand().toStringAST(); } return super.toStringAST(); }
@Override public boolean isCompilable() { if (!getLeftOperand().isCompilable()) { return false; } if (this.children.length > 1) { if (!getRightOperand().isCompilable()) { return false; } } return (this.exitTypeDescriptor != null); }
protected boolean isCompilableOperatorUsingNumerics() { SpelNodeImpl left = getLeftOperand(); SpelNodeImpl right = getRightOperand(); if (!left.isCompilable() || !right.isCompilable()) { return false; } // Supported operand types for equals (at the moment) String leftDesc = left.exitTypeDescriptor; String rightDesc = right.exitTypeDescriptor; DescriptorComparison dc = DescriptorComparison.checkNumericCompatibility( leftDesc, rightDesc, this.leftActualDescriptor, this.rightActualDescriptor); return (dc.areNumbers && dc.areCompatible); }
@Override public boolean isCompilable() { SpelNodeImpl left = getLeftOperand(); SpelNodeImpl right = getRightOperand(); if (!left.isCompilable() || !right.isCompilable()) { return false; } String leftDesc = left.exitTypeDescriptor; String rightDesc = right.exitTypeDescriptor; DescriptorComparison dc = DescriptorComparison.checkNumericCompatibility(leftDesc, rightDesc, this.leftActualDescriptor, this.rightActualDescriptor); return (!dc.areNumbers || dc.areCompatible); }
@Override public boolean isCompilable() { SpelNodeImpl left = getLeftOperand(); SpelNodeImpl right = getRightOperand(); if (!left.isCompilable() || !right.isCompilable()) { return false; } String leftDesc = left.exitTypeDescriptor; String rightDesc = right.exitTypeDescriptor; DescriptorComparison dc = DescriptorComparison.checkNumericCompatibility(leftDesc, rightDesc, this.leftActualDescriptor, this.rightActualDescriptor); return (!dc.areNumbers || dc.areCompatible); }
@Override public boolean isCompilable() { if (!getLeftOperand().isCompilable()) { return false; } if (this.children.length > 1) { if (!getRightOperand().isCompilable()) { return false; } } return (this.exitTypeDescriptor != null); }
@Override public boolean isCompilable() { if (!getLeftOperand().isCompilable()) { return false; } if (this.children.length > 1) { if (!getRightOperand().isCompilable()) { return false; } } return (this.exitTypeDescriptor != null); }
@Override public boolean isCompilable() { if (!getLeftOperand().isCompilable()) { return false; } if (this.children.length > 1) { if (!getRightOperand().isCompilable()) { return false; } } return (this.exitTypeDescriptor != null); }
@Override public boolean isCompilable() { if (!getLeftOperand().isCompilable()) { return false; } if (this.children.length > 1) { if (!getRightOperand().isCompilable()) { return false; } } return (this.exitTypeDescriptor != null); }
@Override public boolean isCompilable() { return (this.exitTypeDescriptor != null && getLeftOperand().isCompilable()); }
@Override public String toStringAST() { return getLeftOperand().toStringAST() + "++"; }
@Override public TypedValue getValueInternal(ExpressionState state) throws EvaluationException { return getValueRef(state).getValue(); }
@Override public TypedValue getValueInternal(ExpressionState state) throws EvaluationException { return getValueRef(state).getValue(); }
@Override public boolean isWritable(ExpressionState state) throws EvaluationException { return getValueRef(state).isWritable(); }
@Override public String toStringAST() { return getLeftOperand().toStringAST() + "--"; }
/** * Evaluates a compound expression. This involves evaluating each piece in turn and the * return value from each piece is the active context object for the subsequent piece. * @param state the state in which the expression is being evaluated * @return the final value from the last piece of the compound expression */ @Override public TypedValue getValueInternal(ExpressionState state) throws EvaluationException { ValueRef ref = getValueRef(state); TypedValue result = ref.getValue(); this.exitTypeDescriptor = this.children[this.children.length - 1].exitTypeDescriptor; return result; }
@Override public TypedValue getValueInternal(ExpressionState state) throws EvaluationException { return getValueRef(state).getValue(); }
@Override public boolean isWritable() { return this.ref.isWritableProperty(this.ref.name, this.contextObject, this.evalContext); } }