当前位置: 首页>>代码示例>>Java>>正文


Java ELText类代码示例

本文整理汇总了Java中org.apache.jasper.compiler.ELNode.ELText的典型用法代码示例。如果您正苦于以下问题:Java ELText类的具体用法?Java ELText怎么用?Java ELText使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ELText类属于org.apache.jasper.compiler.ELNode包,在下文中一共展示了ELText类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: parseEL

import org.apache.jasper.compiler.ELNode.ELText; //导入依赖的package包/类
/**
 * Parse an EL expression string '${...}'. Currently only separates the EL
 * into functions and everything else.
 * 
 * @return An ELNode.Nodes representing the EL expression
 * 
 * Note: This can not be refactored to use the standard EL implementation as
 *       the EL API does not provide the level of access required to the
 *       parsed expression.
 */
private ELNode.Nodes parseEL() {

    StringBuilder buf = new StringBuilder();
    ELexpr = new ELNode.Nodes();
    curToken = null;
    prevToken = null;
    while (hasNext()) {
        curToken = nextToken();
        if (curToken instanceof Char) {
            if (curToken.toChar() == '}') {
                break;
            }
            buf.append(curToken.toString());
        } else {
            // Output whatever is in buffer
            if (buf.length() > 0) {
                ELexpr.add(new ELNode.ELText(buf.toString()));
                buf.setLength(0);
            }
            if (!parseFunction()) {
                ELexpr.add(new ELNode.ELText(curToken.toString()));
            }
        }
    }
    if (curToken != null) {
        buf.append(curToken.getWhiteSpace());
    }
    if (buf.length() > 0) {
        ELexpr.add(new ELNode.ELText(buf.toString()));
    }

    return ELexpr;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:44,代码来源:ELParser.java

示例2: parseEL

import org.apache.jasper.compiler.ELNode.ELText; //导入依赖的package包/类
/**
 * Parse an EL expression string '${...}'. Currently only separates the EL
 * into functions and everything else.
 * 
 * @return An ELNode.Nodes representing the EL expression
 * 
 *         Note: This can not be refactored to use the standard EL
 *         implementation as the EL API does not provide the level of access
 *         required to the parsed expression.
 */
private ELNode.Nodes parseEL() {

	StringBuilder buf = new StringBuilder();
	ELexpr = new ELNode.Nodes();
	curToken = null;
	prevToken = null;
	while (hasNext()) {
		curToken = nextToken();
		if (curToken instanceof Char) {
			if (curToken.toChar() == '}') {
				break;
			}
			buf.append(curToken.toString());
		} else {
			// Output whatever is in buffer
			if (buf.length() > 0) {
				ELexpr.add(new ELNode.ELText(buf.toString()));
				buf.setLength(0);
			}
			if (!parseFunction()) {
				ELexpr.add(new ELNode.ELText(curToken.toString()));
			}
		}
	}
	if (curToken != null) {
		buf.append(curToken.getWhiteSpace());
	}
	if (buf.length() > 0) {
		ELexpr.add(new ELNode.ELText(buf.toString()));
	}

	return ELexpr;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:44,代码来源:ELParser.java

示例3: parseEL

import org.apache.jasper.compiler.ELNode.ELText; //导入依赖的package包/类
/**
 * Parse an EL expression string '${...}'. Currently only separates the EL
 * into functions and everything else.
 *
 * @return An ELNode.Nodes representing the EL expression
 *
 * Note: This can not be refactored to use the standard EL implementation as
 *       the EL API does not provide the level of access required to the
 *       parsed expression.
 */
private ELNode.Nodes parseEL() {

    StringBuilder buf = new StringBuilder();
    ELexpr = new ELNode.Nodes();
    curToken = null;
    prevToken = null;
    while (hasNext()) {
        curToken = nextToken();
        if (curToken instanceof Char) {
            if (curToken.toChar() == '}') {
                break;
            }
            buf.append(curToken.toString());
        } else {
            // Output whatever is in buffer
            if (buf.length() > 0) {
                ELexpr.add(new ELNode.ELText(buf.toString()));
                buf.setLength(0);
            }
            if (!parseFunction()) {
                ELexpr.add(new ELNode.ELText(curToken.toString()));
            }
        }
    }
    if (curToken != null) {
        buf.append(curToken.getWhiteSpace());
    }
    if (buf.length() > 0) {
        ELexpr.add(new ELNode.ELText(buf.toString()));
    }

    return ELexpr;
}
 
开发者ID:nkasvosve,项目名称:beyondj,代码行数:44,代码来源:ELParser.java

示例4: visit

import org.apache.jasper.compiler.ELNode.ELText; //导入依赖的package包/类
@Override
public void visit(ELText n) throws JasperException {
    output.append(escapeELText(n.getText()));
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:5,代码来源:ELParser.java

示例5: visit

import org.apache.jasper.compiler.ELNode.ELText; //导入依赖的package包/类
@Override
public void visit(ELText n) throws JasperException {
	output.append(escapeELText(n.getText()));
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:5,代码来源:ELParser.java

示例6: visit

import org.apache.jasper.compiler.ELNode.ELText; //导入依赖的package包/类
@Override
public void visit(ELText n) throws JasperException {
    output.append(n.getText());
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:5,代码来源:ELParser.java


注:本文中的org.apache.jasper.compiler.ELNode.ELText类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。