Commented out the sections on list projection and #this.
This commit is contained in:
parent
f20dcf275f
commit
3cac9267e9
|
|
@ -94,11 +94,11 @@
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>User defined functions</para>
|
<para>User defined functions</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<!--
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>List projections</para>
|
<para>List projections</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
-->
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Templated expressions</para>
|
<para>Templated expressions</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
@ -157,8 +157,8 @@ String message = (String) exp.getValue();</programlisting>
|
||||||
Expression exp = parser.parseExpression("<emphasis role="bold">'Hello World'.bytes</emphasis>"); // invokes 'getBytes()'
|
Expression exp = parser.parseExpression("<emphasis role="bold">'Hello World'.bytes</emphasis>"); // invokes 'getBytes()'
|
||||||
byte[] bytes = (byte[]) exp.getValue();</programlisting>
|
byte[] bytes = (byte[]) exp.getValue();</programlisting>
|
||||||
|
|
||||||
<para>Upper or lowercase can be used to specify the property name. SpEL
|
<para>
|
||||||
also supports nested properties using standard 'dot' notation, i.e.
|
SpEL also supports nested properties using standard 'dot' notation, i.e.
|
||||||
prop1.prop2.prop3 and the setting of property values</para>
|
prop1.prop2.prop3 and the setting of property values</para>
|
||||||
|
|
||||||
<para>Public fields may also be accessed</para>
|
<para>Public fields may also be accessed</para>
|
||||||
|
|
@ -217,7 +217,7 @@ String name = (String) exp.getValue(context);</programlisting>In the last
|
||||||
shown using the Inventor object in the previous example</para>
|
shown using the Inventor object in the previous example</para>
|
||||||
|
|
||||||
<programlisting language="java">Expression exp = parser.parseExpression("name == 'Nikola Tesla'");
|
<programlisting language="java">Expression exp = parser.parseExpression("name == 'Nikola Tesla'");
|
||||||
boolean isEqual = exp.getValue(context, Boolean.class); // evaluates to true</programlisting>
|
boolean result = exp.getValue(context, Boolean.class); // evaluates to true</programlisting>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<title>The EvaluationContext interface </title>
|
<title>The EvaluationContext interface </title>
|
||||||
|
|
@ -420,9 +420,9 @@ Object nullValue = parser.parseExpression("null").getValue();
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<title>Properties, Arrays, Lists, Dictionaries, Indexers</title>
|
<title>Properties, Arrays, Lists, Maps, Indexers</title>
|
||||||
|
|
||||||
<para>Navigating through properties is easy, just use a period to
|
<para>Navigating with property references is easy, just use a period to
|
||||||
indicate a nested property value. The instances of Inventor class, pupin
|
indicate a nested property value. The instances of Inventor class, pupin
|
||||||
and tesla, were populated with data listed in section Section <link
|
and tesla, were populated with data listed in section Section <link
|
||||||
linkend="expressions-examples-classes">Classes used in the
|
linkend="expressions-examples-classes">Classes used in the
|
||||||
|
|
@ -460,9 +460,9 @@ String name = parser.parseExpression("Members[0].Name").getValue(societyContext,
|
||||||
String invention = parser.parseExpression("Members[0].Inventions[6]").getValue(societyContext, String.class);
|
String invention = parser.parseExpression("Members[0].Inventions[6]").getValue(societyContext, String.class);
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<para>The contents of dictionaries are obtained by specifying the
|
<para>The contents of maps are obtained by specifying the
|
||||||
literal key value within the brackets. In this case, because keys for
|
literal key value within the brackets. In this case, because keys for
|
||||||
the Officers dictionary are strings, we can specify string
|
the Officers map are strings, we can specify string
|
||||||
literal.</para>
|
literal.</para>
|
||||||
|
|
||||||
<programlisting lang="" language="java">// Officer's Dictionary
|
<programlisting lang="" language="java">// Officer's Dictionary
|
||||||
|
|
@ -669,6 +669,7 @@ parser.parseExpression("Name = #newName").getValue(context);
|
||||||
|
|
||||||
System.out.println(tesla.getName()) // "Mike Tesla"</programlisting>
|
System.out.println(tesla.getName()) // "Mike Tesla"</programlisting>
|
||||||
|
|
||||||
|
<!--
|
||||||
<section>
|
<section>
|
||||||
<title>The #this variable</title>
|
<title>The #this variable</title>
|
||||||
|
|
||||||
|
|
@ -689,6 +690,7 @@ List<Integer> primesGreaterThanTen = (List<Integer>) parser.parseExp
|
||||||
|
|
||||||
//evaluates to [11, 13, 17]</programlisting>
|
//evaluates to [11, 13, 17]</programlisting>
|
||||||
</section>
|
</section>
|
||||||
|
-->
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="expressions-ref-functions">
|
<section id="expressions-ref-functions">
|
||||||
|
|
@ -749,6 +751,7 @@ String queryResultString = parser.parseExpression(expression).getValue(societyCo
|
||||||
// queryResultString = "Nikola Tesla is a member of the IEEE Society"</programlisting>
|
// queryResultString = "Nikola Tesla is a member of the IEEE Society"</programlisting>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<!--
|
||||||
<section>
|
<section>
|
||||||
<title>List Selection</title>
|
<title>List Selection</title>
|
||||||
|
|
||||||
|
|
@ -764,6 +767,7 @@ String queryResultString = parser.parseExpression(expression).getValue(societyCo
|
||||||
|
|
||||||
<programlisting language="java">List<Inventor> list = (List<Inventor>) parser.parseExpression("Members.?{Nationality == 'Serbian'}").getValue(societyContext);</programlisting>
|
<programlisting language="java">List<Inventor> list = (List<Inventor>) parser.parseExpression("Members.?{Nationality == 'Serbian'}").getValue(societyContext);</programlisting>
|
||||||
</section>
|
</section>
|
||||||
|
-->
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<title>Expression templating</title>
|
<title>Expression templating</title>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue