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


Java FunctionInfo类代码示例

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


FunctionInfo类属于javax.servlet.jsp.tagext包,在下文中一共展示了FunctionInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: createFunctionInfo

import javax.servlet.jsp.tagext.FunctionInfo; //导入依赖的package包/类
FunctionInfo createFunctionInfo(TreeNode elem) {

        String name = null;
        String klass = null;
        String signature = null;

        Iterator<TreeNode> list = elem.findChildren();
        while (list.hasNext()) {
            TreeNode element = list.next();
            String tname = element.getName();

            if ("name".equals(tname)) {
                name = element.getBody();
            } else if ("function-class".equals(tname)) {
                klass = element.getBody();
            } else if ("function-signature".equals(tname)) {
                signature = element.getBody();
            } else if ("display-name".equals(tname) || // Ignored elements
                    "small-icon".equals(tname) || "large-icon".equals(tname)
                    || "description".equals(tname) || "example".equals(tname)) {
            } else {
                if (log.isWarnEnabled()) {
                    log.warn(Localizer.getMessage(
                            "jsp.warning.unknown.element.in.function", tname));
                }
            }
        }

        return new FunctionInfo(name, klass, signature);
    }
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:31,代码来源:TagLibraryInfoImpl.java

示例4: 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

示例5: createFunctionInfo

import javax.servlet.jsp.tagext.FunctionInfo; //导入依赖的package包/类
FunctionInfo createFunctionInfo(TreeNode elem) {

        String name = null;
        String klass = null;
        String signature = null;

        Iterator list = elem.findChildren();
        while (list.hasNext()) {
            TreeNode element = (TreeNode) list.next();
            String tname = element.getName();

            if ("name".equals(tname)) {
                name = element.getBody();
            } else if ("function-class".equals(tname)) {
                klass = element.getBody();
            } else if ("function-signature".equals(tname)) {
                signature = element.getBody();
            } else if ("display-name".equals(tname) || // Ignored elements
                    "small-icon".equals(tname) || "large-icon".equals(tname)
                    || "description".equals(tname) || "example".equals(tname)) {
            } else {
                log.warn(Localizer.getMessage(
                            "jsp.warning.unknown.element.in.function", tname));
            }
        }

        return new FunctionInfo(name, klass, signature);
    }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:29,代码来源:TagLibraryInfoImpl.java

示例6: 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

示例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:how2j,项目名称:lazycat,代码行数:35,代码来源:Validator.java

示例8: createFunctionInfo

import javax.servlet.jsp.tagext.FunctionInfo; //导入依赖的package包/类
FunctionInfo createFunctionInfo(TreeNode elem) {

		String name = null;
		String klass = null;
		String signature = null;

		Iterator<TreeNode> list = elem.findChildren();
		while (list.hasNext()) {
			TreeNode element = list.next();
			String tname = element.getName();

			if ("name".equals(tname)) {
				name = element.getBody();
			} else if ("function-class".equals(tname)) {
				klass = element.getBody();
			} else if ("function-signature".equals(tname)) {
				signature = element.getBody();
			} else if ("display-name".equals(tname) || // Ignored elements
					"small-icon".equals(tname) || "large-icon".equals(tname) || "description".equals(tname)
					|| "example".equals(tname)) {
			} else {
				if (log.isWarnEnabled()) {
					log.warn(Localizer.getMessage("jsp.warning.unknown.element.in.function", tname));
				}
			}
		}

		return new FunctionInfo(name, klass, signature);
	}
 
开发者ID:how2j,项目名称:lazycat,代码行数:30,代码来源:TagLibraryInfoImpl.java

示例9: 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

示例10: createFunctionInfo

import javax.servlet.jsp.tagext.FunctionInfo; //导入依赖的package包/类
private FunctionInfo createFunctionInfo(TreeNode elem)
        throws JasperException {

    String name = null;
    String klass = null;
    String signature = null;

    Iterator list = elem.findChildren();
    while (list.hasNext()) {
        TreeNode element = (TreeNode) list.next();
        String tname = element.getName();

        if ("name".equals(tname)) {
            name = element.getBody();
        } else if ("function-class".equals(tname)) {
            klass = element.getBody();
        } else if ("function-signature".equals(tname)) {
            signature = element.getBody();
        } else if ("display-name".equals(tname) ||    // Ignored elements
                 "small-icon".equals(tname) ||
                 "large-icon".equals(tname) ||
                 "description".equals(tname) || 
                 "example".equals(tname)) {
        } else {
            err.jspError("jsp.error.unknown.element.in.function",
                         tname);
 }
    }

    return new FunctionInfo(name, klass, signature);
}
 
开发者ID:eclipse,项目名称:packagedrone,代码行数:32,代码来源:TagLibraryInfoImpl.java

示例11: 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

示例12: setFunctionInfo

import javax.servlet.jsp.tagext.FunctionInfo; //导入依赖的package包/类
public void setFunctionInfo(FunctionInfo f) {
    this.functionInfo = f;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:4,代码来源:ELNode.java

示例13: getFunctionInfo

import javax.servlet.jsp.tagext.FunctionInfo; //导入依赖的package包/类
public FunctionInfo getFunctionInfo() {
    return functionInfo;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:4,代码来源:ELNode.java

示例14: setFunctionInfo

import javax.servlet.jsp.tagext.FunctionInfo; //导入依赖的package包/类
public void setFunctionInfo(FunctionInfo f) {
	this.functionInfo = f;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:4,代码来源:ELNode.java

示例15: getFunctionInfo

import javax.servlet.jsp.tagext.FunctionInfo; //导入依赖的package包/类
public FunctionInfo getFunctionInfo() {
	return functionInfo;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:4,代码来源:ELNode.java


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