- 浏览: 473558 次
- 性别:
- 来自: 武汉
最新评论
-
zyzyzy123:
请问有工程吗,我现在正在实现打电话的功能,但是一直不通,怀疑是 ...
实用的java 串口通信程序 -
wuhaitong:
引用[img][/img][*][url][/url] ...
jbpm -
迷糊_le:
maven命令, 蛮好的,谢谢
maven eclipse -
Wuaner:
不错的文章 , 谢谢分享!
Hadoop -
yuqihengsheng:
strong 很细
HighLighter
Comments | Specified using ## or // and extend to the end of line, e.g.
## This is a comment // , e.g.
// This is a comment /*...*/ , e.g.
/* This is a multi-line comment */ |
Identifiers / variables | Must start with a-z , A-Z , _ or $ . Can then be followed by 0-9 , a-z , A-Z , _ or $ . e.g.
Variable names are case-sensitive, e.g. NOTE: JEXL does not support variables with hyphens in them, e.g. commons-logging // invalid variable name (hyphenated) logging from the variable commons
JEXL also supports my.dotted.var
N.B. the following keywords are reserved, and cannot be used as a variable name or property when using the dot operator: my.new.dotted.var // invalid ('new' is keyword) my['new'].dotted.var
|
Scripts | A script in Jexl is made up of zero or more statements. Scripts can be read from a String, File or URL. |
Statements | A statement can be the empty statement, the semicolon (; ) , block, assignment or an expression. Statements are optionally terminated with a semicolon. |
Block | A block is simply multiple statements inside curly braces ({, } ). |
Assignment | Assigns the value of a variable (my.var = 'a value' ) using a JexlContext as initial resolver. Both beans and ant-ish variables assignment are supported. |
Method calls | Calls a method of an object, e.g.
"hello world".hashCode() hashCode method of the "hello world" String.
In case of multiple arguments and overloading, Jexl will make the best effort to find the most appropriate non ambiguous method to call. |
Literals
Integer Literals | 1 or more digits from 0 to 9
|
Floating point Literals | 1 or more digits from 0 to 9 , followed by a decimal point and then one or more digits from 0 to 9 . |
String literals | Can start and end with either ' or " delimiters, e.g.
"Hello world" 'Hello world' The escape character is |
Boolean literals | The literals true and false can be used, e.g.
val1 == true |
Null literal | The null value is represented as in java using the literal null , e.g.
val1 == null |
Array literal | A [ followed by one or more expressions separated by , and ending with ] , e.g.
[ 1, 2, "three" ] This syntax creates an JEXL will attempt to strongly type the array; if all entries are of the same class or if all entries are Number instance, the array literal will be an Furthermore, if all entries in the array literal are of the same class and that class has an equivalent primitive type, the array returned will be a primitive array. e.g. |
Map literal | A { followed by one or more sets of key : value pairs separated by , and ending with } , e.g.
{ "one" : 1, "two" : 2, "three" : 3, "more": "many more" } This syntax creates a |
Functions
empty | Returns true if the expression following is either:
empty(var1) |
size | Returns the information about the expression:
size("Hello") |
new | Creates a new instance using a fully-qualified class name or Class:
new("java.lang.Double", 10) Note that the first argument of In case of multiple constructors, Jexl will make the best effort to find the most appropriate non ambiguous constructor to call. |
ns:function | A JexlEngine can register objects or classes used as function namespaces. This can allow expressions like:
math:cosinus(23.0) |
Operators
Boolean and
|
The usual && operator can be used as well as the word and , e.g.
cond1 and cond2 cond1 && cond2 |
Boolean or
|
The usual || operator can be used as well as the word or , e.g.
cond1 or cond2 cond1 || cond2 |
Boolean not
|
The usual ! operator can be used as well as the word not , e.g.
!cond1 not cond1 |
Bitwise and
|
The usual & operator is used, e.g.
33 & 4 |
Bitwise or
|
The usual | operator is used, e.g.
33 | 4 |
Bitwise xor
|
The usual ^ operator is used, e.g.
33 ^ 4 |
Bitwise complement
|
The usual ~ operator is used, e.g.
~33 |
Ternary conditional ?:
|
The usual ternary conditional operator condition ? if_true : if_false operator can be used as well as the abbreviation value ?: if_false which returns the value if its evaluation is defined, non-null and non-false, e.g.
val1 ? val1 : val2 val1 ?: val2 NOTE: The condition will evaluate to |
Equality | The usual == operator can be used as well as the abbreviation eq . For example
val1 == val2 val1 eq val2
|
Inequality | The usual != operator can be used as well as the abbreviation ne . For example
val1 != val2 val1 ne val2 |
Less Than | The usual < operator can be used as well as the abbreviation lt . For example
val1 < val2 val1 lt val2 |
Less Than Or Equal To | The usual <= operator can be used as well as the abbreviation le . For example
val1 <= val2 val1 le val2 |
Greater Than | The usual > operator can be used as well as the abbreviation gt . For example
val1 > val2 val1 gt val2 |
Greater Than Or Equal To | The usual >= operator can be used as well as the abbreviation ge . For example
val1 >= val2 val1 ge val2 |
Regex match =~
|
The Perl inspired =~ operator can be used to check that a string matches a regular expression (expressed either a Java String or a java.util.regex.Pattern). For example "abcdef" =~ "abc.* returns true . |
Regex no-match !~
|
The Perl inspired !~ operator can be used to check that a string does not match a regular expression (expressed either a Java String or a java.util.regex.Pattern). For example "abcdef" !~ "abc.* returns false . |
Addition | The usual + operator is used. For example
val1 + val2 |
Subtraction | The usual - operator is used. For example
val1 - val2 |
Multiplication | The usual * operator is used. For example
val1 * val2 |
Division | The usual / operator is used, or one can use the div operator. For example
val1 / val2 val1 div val2 |
Modulus (or remainder) | The % operator is used. An alternative is the mod operator. For example
5 mod 2 5 % 2 |
Negation | The unary - operator is used. For example
-12 |
Array access | Array elements may be accessed using either square brackets or a dotted numeral, e.g.
arr1[0] arr1.0 |
HashMap access | Map elements are accessed using square brackets, e.g.
map[0]; map['name']; map[var]; map['7'] map[7] map[0] map.0 |
Conditional
if | Classic, if/else statement, e.g.
if ((x * 2) == 5) { y = 1; } else { y = 2; } |
for | Loop through items of an Array, Collection, Map, Iterator or Enumeration, e.g.
for(item : list) { x = x + item; } item and list are variables. The JEXL 1.1 syntax using foreach(item in list) is now deprecated. |
while | Loop until a condition is satisfied, e.g.
while (x lt 10) { x = x + 2; } |
发表评论
-
Apache + Tomcat集群配置详解
2013-10-15 19:57 703Apache + Tomcat集群配置详解 ... -
maven eclipse
2013-06-05 08:41 10541. 安装m2eclipse插件 要用Eclipse构 ... -
ZooKeeper API
2013-05-16 17:27 8841)ZooKeeper API 简介 ZooKeeper ... -
给DIV添加滚动条
2012-08-02 10:51 1100直接为div指定overflow ... -
jboss数据源
2012-03-21 15:19 880jboss.xml in ejb/META-INF ... -
Apache+Jobss cluster安装配置
2012-03-21 11:21 1099系统环境:OS:linux AS4 2.6.9-78.EL A ... -
Spring 事务
2012-02-14 12:26 988Spring 事务不回滚的问题关键是:不能对该异常用 ... -
Apache 负载均衡+Tomcat集群
2012-01-17 08:45 1089一、本机环境 1.Windows 7 64位操作系统 2. ... -
ESB企业服务总线
2011-12-20 15:37 1294ESB是企业服务总线(Ente ... -
定庄记忆法
2011-08-13 10:53 1026桩可以分为大中小三类 ... -
Android开发环境搭建全程演示(jdk+eclip+android sdk)
2011-07-12 13:44 907Android开发环境搭建全程演示(jdk+eclip+a ... -
jbpm
2011-05-17 14:44 2012JBPM_ACTION action记录表 JBPM_DECI ... -
企业信息化十年
2010-12-02 22:06 9202000年之前:宇宙大爆炸 ... -
首先,遍历map有以下方法:
2010-10-22 13:00 1455首先,遍历map有以下方 ... -
职场能力
2010-10-02 17:49 1057如今职场竞争越发激烈,一大群求职者竞聘同一个(或少数几个)岗位 ... -
tomcat 配置
2010-09-24 10:39 9761、 PermGen space的全称是Permanent ... -
YUI:带checkbox的TreeView的赋值与读值
2010-09-18 21:26 2110日前做一个用户权限管理的页面,权限是一个树形结构,每个节点前是 ... -
Spring中的Assert工具类
2010-09-05 21:02 885方法入参检测工具 ... -
tomcat 配置
2010-09-02 06:43 1404Tomcat内存溢出的原因 在生产环境中tomcat内存设置 ... -
wget
2010-07-21 08:56 1227wget功能的强大就不用多说了,在高手手里,它就像是个无往不利 ...
相关推荐
VS10x Comments Extender VS2010 絕妙註解套件
Recent Comments插件的特点: •widget样式:可以定义每个边栏放置的CSS规则 •评论过滤:过滤你要输出的评论,可以更加分类、页面来显示访客的评论 •评论类型:可以选择评论显示的类型 •自定义标签:混合使用...
java的comments-logging包
Laravel开发-comments 一个简单的评论包
comments.txt(合并后的评论)
http://wordpress.org/extend/plugins/sexy-comments/installation/ 替换原来的评论模板,让评论区域看起来有点像论坛的风格,确实相当Sexy。
前端项目-side-comments,一个接口组件,用于提供网站/app medium.com风格的评论。
strip-json-comments, 在JSON文件中,从JSON中去除注释 strip-json-comments 去除JSON注释。让你在JSON文件中使用注释 !现在是可能的:{ // rainbows "unicorn": /* ❤ */ "cake"}它将用空格替换单
meteor-comments-ui, 在你的Meteor 应用程序中,用于注释功能的简单模板 Meteor 注释用户界面 这里软件包允许你在几秒钟内添加注释框。 注释UI为 komentify插件提供基础,它允许你在不需要自定义后端的情况下向任何...
vs插件 图片注释
visual studio 2010 plugin
commit-comments 会根据你代码中评论的变化而自动创建一个提交评论的无序列表。使用关键字 @commit 写评论时,commit-comments 会你在点击提交时,自动添加你的评论信息。依赖:GNU sed 需要在 post-commit 中移除 @...
这是一个包含了4000条酒店评论文本的语料,其中2000条正向评论用1作为标签,2000条负向评论用0作为标签。可以用来训练情感分析模型。
Overall, I would say that the 56A authors have done well in ... I am not sure how much more convenient for the 56A this red text convention is, but it helps remind me to make more constructive comments.
comments 的好资料 很好用的哦 呵呵
https://www.mathworks.com/matlabcentral/fileexchange/21494-a-802-16d-system-comments-on-english 一个 WiMAX 模拟,您可以在其中定义要模拟的 OFDM 符号数量、信道类型(SUI 1-6 或 AWGN 通道)、大量 BW ...
中国上市公司股吧评论数据库(Stocks Comments of Chines e Listed Companies, GUBA)是基于我国网络股吧论坛中上市公 司的帖子评论进行统计研究而建立的专业性财经文本数据库。该数据库主要根据中国股吧论 坛网民对...
$ npm install strip-css-comments 用法 const stripCssComments = require ( 'strip-css-comments' ) ; // By default important comments `/*!` are preserved stripCssComments ( '/*! <copyright> */ body { /...
NULL 博文链接:https://mendelife.iteye.com/blog/814961
前端开源库-json-commentsJSON注释,让您的JSON配置文件支持注释。