public boolean isNodeSimpleProperty(OgnlContext context) throws OgnlException { return (_children != null) && (_children.length == 1) && ((SimpleNode) _children[0]).isConstant(context); }
public boolean isNodeSimpleProperty(OgnlContext context) throws OgnlException { return (_children != null) && (_children.length == 1) && ((SimpleNode) _children[0]).isConstant(context); }
public boolean isNodeSimpleProperty( OgnlContext context ) throws OgnlException { return (children != null) && (children.length == 1) && ((SimpleNode)children[0]).isConstant(context); }
public static boolean isConstant( Object tree, Map context ) throws OgnlException { return ((SimpleNode)tree).isConstant( (OgnlContext)addDefaultContext( null, context ) ); }
public boolean isConstant( OgnlContext context ) throws OgnlException { boolean result = isNodeConstant(context); if ((_children != null) && (_children.length > 0)) { result = true; for ( int i=0; result && (i < _children.length); ++i ) { if (_children[i] instanceof SimpleNode) { result = ((SimpleNode)_children[i]).isConstant( context ); } else { result = false; } } } return result; }
public boolean isConstant( OgnlContext context ) throws OgnlException { boolean result = isNodeConstant(context); if ((children != null) && (children.length > 0)) { result = true; for ( int i=0; result && (i < children.length); ++i ) { if (children[i] instanceof SimpleNode) { result = ((SimpleNode)children[i]).isConstant( context ); } else { result = false; } } } return result; }
public boolean isConstant( OgnlContext context ) throws OgnlException { boolean result = isNodeConstant(context); if ((_children != null) && (_children.length > 0)) { result = true; for ( int i=0; result && (i < _children.length); ++i ) { if (_children[i] instanceof SimpleNode) { result = ((SimpleNode)_children[i]).isConstant( context ); } else { result = false; } } } return result; }
/** * Checks if the specified {@link Node} instance represents a constant * expression. * * @param tree * The {@link Node} to check. * @param context * The context to use. * * @return True if the node is a constant - false otherwise. * @throws OgnlException If an error occurs checking the expression. */ public static boolean isConstant(Object tree, Map context) throws OgnlException { return ((SimpleNode) tree).isConstant((OgnlContext) addDefaultContext(null, context)); }
/** * Checks if the specified {@link Node} instance represents a constant * expression. * * @param tree * The {@link Node} to check. * @param context * The context to use. * * @return True if the node is a constant - false otherwise. * @throws OgnlException If an error occurs checking the expression. */ public static boolean isConstant(Object tree, Map context) throws OgnlException { return ((SimpleNode) tree).isConstant((OgnlContext) addDefaultContext(null, context)); }
@Override public boolean isOperation(OgnlContext context) throws OgnlException { if (_children.length == 1) { SimpleNode child = (SimpleNode) _children[0]; return child.isOperation(context) || !child.isConstant(context); } return super.isOperation(context); } }
@Override public boolean isOperation(OgnlContext context) throws OgnlException { if (_children.length == 1) { SimpleNode child = (SimpleNode) _children[0]; return child.isOperation(context) || !child.isConstant(context); } return super.isOperation(context); } }
protected Object evaluateGetValueBody( OgnlContext context, Object source ) throws OgnlException { Object result; context.setCurrentObject(source); context.setCurrentNode(this); if (!constantValueCalculated) { constantValueCalculated = true; hasConstantValue = isConstant(context); if (hasConstantValue) { constantValue = getValueBody(context, source); } } return hasConstantValue ? constantValue : getValueBody(context, source); }
protected Object evaluateGetValueBody(OgnlContext context, Object source) throws OgnlException { context.setCurrentObject(source); context.setCurrentNode(this); if (!_constantValueCalculated) { _constantValueCalculated = true; boolean constant = isConstant(context); if (constant) { _constantValue = getValueBody(context, source); } _hasConstantValue = constant; } return _hasConstantValue ? _constantValue : getValueBody(context, source); }
protected Object evaluateGetValueBody(OgnlContext context, Object source) throws OgnlException { context.setCurrentObject(source); context.setCurrentNode(this); if (!_constantValueCalculated) { _constantValueCalculated = true; boolean constant = isConstant(context); if (constant) { _constantValue = getValueBody(context, source); } _hasConstantValue = constant; } return _hasConstantValue ? _constantValue : getValueBody(context, source); }