本文整理汇总了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();
}
示例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()]);
}
示例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()]);
}
示例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();
}
示例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()]);
}
示例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));
}
示例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()]);
}