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


Java FunctionInfo.getFunctionSignature方法代码示例

本文整理汇总了Java中javax.servlet.jsp.tagext.FunctionInfo.getFunctionSignature方法的典型用法代码示例。如果您正苦于以下问题:Java FunctionInfo.getFunctionSignature方法的具体用法?Java FunctionInfo.getFunctionSignature怎么用?Java FunctionInfo.getFunctionSignature使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.servlet.jsp.tagext.FunctionInfo的用法示例。


在下文中一共展示了FunctionInfo.getFunctionSignature方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getMethod

import javax.servlet.jsp.tagext.FunctionInfo; //导入方法依赖的package包/类
/**
 * Get the method name from the signature.
 */
private String getMethod(ELNode.Function func) throws JasperException {
    FunctionInfo funcInfo = func.getFunctionInfo();
    String signature = funcInfo.getFunctionSignature();

    int start = signature.indexOf(' ');
    if (start < 0) {
        err.jspError("jsp.error.tld.fn.invalid.signature", func
                .getPrefix(), func.getName());
    }
    int end = signature.indexOf('(');
    if (end < 0) {
        err.jspError(
                "jsp.error.tld.fn.invalid.signature.parenexpected",
                func.getPrefix(), func.getName());
    }
    return signature.substring(start + 1, end).trim();
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:21,代码来源:Validator.java

示例2: getParameters

import javax.servlet.jsp.tagext.FunctionInfo; //导入方法依赖的package包/类
/**
 * Get the parameters types from the function signature.
 *
 * @return An array of parameter class names
 */
private String[] getParameters(ELNode.Function func)
        throws JasperException {
    FunctionInfo funcInfo = func.getFunctionInfo();
    String signature = funcInfo.getFunctionSignature();
    ArrayList<String> params = new ArrayList<String>();
    // Signature is of the form
    // <return-type> S <method-name S? '('
    // < <arg-type> ( ',' <arg-type> )* )? ')'
    int start = signature.indexOf('(') + 1;
    boolean lastArg = false;
    while (true) {
        int p = signature.indexOf(',', start);
        if (p < 0) {
            p = signature.indexOf(')', start);
            if (p < 0) {
                err.jspError("jsp.error.tld.fn.invalid.signature", func
                        .getPrefix(), func.getName());
            }
            lastArg = true;
        }
        String arg = signature.substring(start, p).trim();
        if (!"".equals(arg)) {
            params.add(arg);
        }
        if (lastArg) {
            break;
        }
        start = p + 1;
    }
    return params.toArray(new String[params.size()]);
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:37,代码来源:Validator.java

示例3: getParameters

import javax.servlet.jsp.tagext.FunctionInfo; //导入方法依赖的package包/类
/**
 * Get the parameters types from the function signature.
 * 
 * @return An array of parameter class names
 */
private String[] getParameters(ELNode.Function func)
        throws JasperException {
    FunctionInfo funcInfo = func.getFunctionInfo();
    String signature = funcInfo.getFunctionSignature();
    ArrayList<String> params = new ArrayList<String>();
    // Signature is of the form
    // <return-type> S <method-name S? '('
    // < <arg-type> ( ',' <arg-type> )* )? ')'
    int start = signature.indexOf('(') + 1;
    boolean lastArg = false;
    while (true) {
        int p = signature.indexOf(',', start);
        if (p < 0) {
            p = signature.indexOf(')', start);
            if (p < 0) {
                err.jspError("jsp.error.tld.fn.invalid.signature", func
                        .getPrefix(), func.getName());
            }
            lastArg = true;
        }
        String arg = signature.substring(start, p).trim();
        if (!"".equals(arg)) {
            params.add(arg);
        }
        if (lastArg) {
            break;
        }
        start = p + 1;
    }
    return (String[]) params.toArray(new String[params.size()]);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:37,代码来源:Validator.java

示例4: getMethod

import javax.servlet.jsp.tagext.FunctionInfo; //导入方法依赖的package包/类
/**
 * Get the method name from the signature.
 */
private String getMethod(ELNode.Function func) throws JasperException {
	FunctionInfo funcInfo = func.getFunctionInfo();
	String signature = funcInfo.getFunctionSignature();

	int start = signature.indexOf(' ');
	if (start < 0) {
		err.jspError("jsp.error.tld.fn.invalid.signature", func.getPrefix(), func.getName());
	}
	int end = signature.indexOf('(');
	if (end < 0) {
		err.jspError("jsp.error.tld.fn.invalid.signature.parenexpected", func.getPrefix(), func.getName());
	}
	return signature.substring(start + 1, end).trim();
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:18,代码来源:Validator.java

示例5: getParameters

import javax.servlet.jsp.tagext.FunctionInfo; //导入方法依赖的package包/类
/**
 * Get the parameters types from the function signature.
 *
 * @return An array of parameter class names
 */
private String[] getParameters(ELNode.Function func) throws JasperException {
	FunctionInfo funcInfo = func.getFunctionInfo();
	String signature = funcInfo.getFunctionSignature();
	ArrayList<String> params = new ArrayList<String>();
	// Signature is of the form
	// <return-type> S <method-name S? '('
	// < <arg-type> ( ',' <arg-type> )* )? ')'
	int start = signature.indexOf('(') + 1;
	boolean lastArg = false;
	while (true) {
		int p = signature.indexOf(',', start);
		if (p < 0) {
			p = signature.indexOf(')', start);
			if (p < 0) {
				err.jspError("jsp.error.tld.fn.invalid.signature", func.getPrefix(), func.getName());
			}
			lastArg = true;
		}
		String arg = signature.substring(start, p).trim();
		if (!"".equals(arg)) {
			params.add(arg);
		}
		if (lastArg) {
			break;
		}
		start = p + 1;
	}
	return params.toArray(new String[params.size()]);
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:35,代码来源:Validator.java

示例6: processSignature

import javax.servlet.jsp.tagext.FunctionInfo; //导入方法依赖的package包/类
private void processSignature(ELNode.Function func)
	throws JasperException {
    FunctionInfo funcInfo = func.getFunctionInfo();
    String signature = funcInfo.getFunctionSignature();
    func.setMethodName(getMethod(signature));
    func.setParameters(getParameters(signature));
}
 
开发者ID:eclipse,项目名称:packagedrone,代码行数:8,代码来源:Validator.java

示例7: getParameters

import javax.servlet.jsp.tagext.FunctionInfo; //导入方法依赖的package包/类
/**
 * Get the parameters types from the function signature.
 * 
 * @return An array of parameter class names
 */
private String[] getParameters(ELNode.Function func)
        throws JasperException {
    FunctionInfo funcInfo = func.getFunctionInfo();
    String signature = funcInfo.getFunctionSignature();
    ArrayList<String> params = new ArrayList<String>();
    // Signature is of the form
    // <return-type> S <method-name S? '('
    // < <arg-type> ( ',' <arg-type> )* )? ')'
    int start = signature.indexOf('(') + 1;
    boolean lastArg = false;
    while (true) {
        int p = signature.indexOf(',', start);
        if (p < 0) {
            p = signature.indexOf(')', start);
            if (p < 0) {
                err.jspError("jsp.error.tld.fn.invalid.signature", func
                        .getPrefix(), func.getName());
            }
            lastArg = true;
        }
        String arg = signature.substring(start, p).trim();
        if (!"".equals(arg)) {
            params.add(arg);
        }
        if (lastArg) {
            break;
        }
        start = p + 1;
    }
    return params.toArray(new String[params.size()]);
}
 
开发者ID:WhiteBearSolutions,项目名称:WBSAirback,代码行数:37,代码来源:Validator.java


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