/usr/share/doc/libognl-java/LanguageGuide/expressionEvaluation.html is in libognl-java-doc 2.7.3-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 | <html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Expression Evaluation</title><link href="../docbook.css" type="text/css" rel="stylesheet"><meta content="DocBook XSL Stylesheets V1.78.1" name="generator"><link rel="home" href="index.html" title="OGNL Language Guide"><link rel="up" href="basicExpressions.html" title="Chapter 4. Expressions"><link rel="prev" href="staticFields.html" title="Getting Static Fields"><link rel="next" href="lambdaExpressions.html" title="Pseudo-Lambda Expressions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">Expression Evaluation</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="staticFields.html"><img src="../images/navigation/prev.gif" alt="Prev"></a> </td><th align="center" width="60%">Chapter 4. Expressions</th><td align="right" width="20%"> <a accesskey="n" href="lambdaExpressions.html"><img src="../images/navigation/next.gif" alt="Next"></a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="expressionEvaluation"></a>Expression Evaluation</h2></div></div></div><p>If you follow an <acronym class="acronym">OGNL</acronym> expression with a parenthesized expression, without a dot in front of the parentheses, <acronym class="acronym">OGNL</acronym> will try to treat the result of the first expression as another expression to
evaluate, and will use the result of the parenthesized expression as the root object for that evaluation. The result of the first expression may be any object; if it is an AST, <acronym class="acronym">OGNL</acronym> assumes it is the parsed form of an
expression and simply interprets it; otherwise, <acronym class="acronym">OGNL</acronym> takes the string value of the object and parses that string to get the AST to interpret.</p><p>For example, this expression</p><pre class="programlisting">#fact(30H)</pre><p>looks up the <span class="property">fact</span> variable, and interprets the value of that variable as an <acronym class="acronym">OGNL</acronym> expression using the <code class="classname">BigInteger</code> representation of <code class="constant">30</code> as the
<span class="property">root</span> object. See below for an example of setting the <code class="varname">fact</code> variable with an expression that returns the factorial of its argument. Note that there is an ambiguity in <acronym class="acronym">OGNL</acronym>'s
syntax between this double evaluation operator and a method call. <acronym class="acronym">OGNL</acronym> resolves this ambiguity by calling anything that looks like a method call, a method call. For example, if the current object had a fact property
that held an <acronym class="acronym">OGNL</acronym> factorial expression, you could not use this approach to call it</p><pre class="programlisting">fact(30H)</pre><p>because <acronym class="acronym">OGNL</acronym> would interpret this as a call to the <span class="property">fact</span> method. You could force the interpretation you want by surrounding the property reference by parentheses:</p><pre class="programlisting">(fact)(30H)</pre></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="staticFields.html"><img src="../images/navigation/prev.gif" alt="Prev"></a> </td><td align="center" width="20%"><a accesskey="u" href="basicExpressions.html"><img src="../images/navigation/up.gif" alt="Up"></a></td><td align="right" width="40%"> <a accesskey="n" href="lambdaExpressions.html"><img src="../images/navigation/next.gif" alt="Next"></a></td></tr><tr><td valign="top" align="left" width="40%">Getting Static Fields </td><td align="center" width="20%"><a accesskey="h" href="index.html"><img src="../images/navigation/home.gif" alt="Home"></a></td><td valign="top" align="right" width="40%"> Pseudo-Lambda Expressions</td></tr></table></div></body></html>
|