本文整理汇总了Java中org.apache.jasper.compiler.ELNode.Function类的典型用法代码示例。如果您正苦于以下问题:Java Function类的具体用法?Java Function怎么用?Java Function使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Function类属于org.apache.jasper.compiler.ELNode包,在下文中一共展示了Function类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: parseFunction
import org.apache.jasper.compiler.ELNode.Function; //导入依赖的package包/类
/**
* Parse for a function FunctionInvokation ::= (identifier ':')? identifier
* '(' (Expression (,Expression)*)? ')' Note: currently we don't parse
* arguments
*/
private boolean parseFunction() {
if (!(curToken instanceof Id) || isELReserved(curToken.toTrimmedString()) ||
prevToken instanceof Char && prevToken.toChar() == '.') {
return false;
}
String s1 = null; // Function prefix
String s2 = curToken.toTrimmedString(); // Function name
int start = index - curToken.toString().length();
Token original = curToken;
if (hasNext()) {
int mark = getIndex() - whiteSpace.length();
curToken = nextToken();
if (curToken.toChar() == ':') {
if (hasNext()) {
Token t2 = nextToken();
if (t2 instanceof Id) {
s1 = s2;
s2 = t2.toTrimmedString();
if (hasNext()) {
curToken = nextToken();
}
}
}
}
if (curToken.toChar() == '(') {
ELexpr.add(new ELNode.Function(s1, s2, expression.substring(start, index - 1)));
return true;
}
curToken = original;
setIndex(mark);
}
return false;
}
开发者ID:liaokailin,项目名称:tomcat7,代码行数:39,代码来源:ELParser.java
示例2: parseFunction
import org.apache.jasper.compiler.ELNode.Function; //导入依赖的package包/类
/**
* Parse for a function FunctionInvokation ::= (identifier ':')? identifier
* '(' (Expression (,Expression)*)? ')' Note: currently we don't parse
* arguments
*/
private boolean parseFunction() {
if (!(curToken instanceof Id) || isELReserved(curToken.toTrimmedString())
|| prevToken instanceof Char && prevToken.toChar() == '.') {
return false;
}
String s1 = null; // Function prefix
String s2 = curToken.toTrimmedString(); // Function name
int start = index - curToken.toString().length();
Token original = curToken;
if (hasNext()) {
int mark = getIndex() - whiteSpace.length();
curToken = nextToken();
if (curToken.toChar() == ':') {
if (hasNext()) {
Token t2 = nextToken();
if (t2 instanceof Id) {
s1 = s2;
s2 = t2.toTrimmedString();
if (hasNext()) {
curToken = nextToken();
}
}
}
}
if (curToken.toChar() == '(') {
ELexpr.add(new ELNode.Function(s1, s2, expression.substring(start, index - 1)));
return true;
}
curToken = original;
setIndex(mark);
}
return false;
}
开发者ID:how2j,项目名称:lazycat,代码行数:39,代码来源:ELParser.java
示例3: visit
import org.apache.jasper.compiler.ELNode.Function; //导入依赖的package包/类
@Override
public void visit(Function n) throws JasperException {
output.append(escapeLiteralExpression(n.getOriginalText(), isDeferredSyntaxAllowedAsLiteral));
output.append('(');
}
开发者ID:liaokailin,项目名称:tomcat7,代码行数:6,代码来源:ELParser.java
示例4: visit
import org.apache.jasper.compiler.ELNode.Function; //导入依赖的package包/类
@Override
public void visit(Function n) throws JasperException {
output.append(escapeLiteralExpression(n.getOriginalText(), isDeferredSyntaxAllowedAsLiteral));
output.append('(');
}
开发者ID:how2j,项目名称:lazycat,代码行数:6,代码来源:ELParser.java
示例5: visit
import org.apache.jasper.compiler.ELNode.Function; //导入依赖的package包/类
@Override
public void visit(Function n) throws JasperException {
output.append(n.getOriginalText());
output.append('(');
}
开发者ID:deathspeeder,项目名称:class-guard,代码行数:6,代码来源:ELParser.java
注:本文中的org.apache.jasper.compiler.ELNode.Function类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论