src/main/java/ognl/Ognl.java
public static boolean isConstant(Object tree, Map context)
            throws OgnlException
    {
        return ((SimpleNode) tree).isConstant((OgnlContext) addDefaultContext(null, context));
    }
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.