本文整理汇总了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();
}
示例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: 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);
}
示例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()]);
}
示例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);
}
示例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();
}
示例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()]);
}
示例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);
}
示例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));
}
示例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);
}
示例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()]);
}
示例12: setFunctionInfo
import javax.servlet.jsp.tagext.FunctionInfo; //导入依赖的package包/类
public void setFunctionInfo(FunctionInfo f) {
this.functionInfo = f;
}
示例13: getFunctionInfo
import javax.servlet.jsp.tagext.FunctionInfo; //导入依赖的package包/类
public FunctionInfo getFunctionInfo() {
return functionInfo;
}
示例14: setFunctionInfo
import javax.servlet.jsp.tagext.FunctionInfo; //导入依赖的package包/类
public void setFunctionInfo(FunctionInfo f) {
this.functionInfo = f;
}
示例15: getFunctionInfo
import javax.servlet.jsp.tagext.FunctionInfo; //导入依赖的package包/类
public FunctionInfo getFunctionInfo() {
return functionInfo;
}