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


Java TagAttributeInfo类代码示例

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


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

示例1: JasperTagInfo

import javax.servlet.jsp.tagext.TagAttributeInfo; //导入依赖的package包/类
public JasperTagInfo(String tagName,
        String tagClassName,
        String bodyContent,
        String infoString,
        TagLibraryInfo taglib,
        TagExtraInfo tagExtraInfo,
        TagAttributeInfo[] attributeInfo,
        String displayName,
        String smallIcon,
        String largeIcon,
        TagVariableInfo[] tvi,
        String mapName) {

    super(tagName, tagClassName, bodyContent, infoString, taglib,
            tagExtraInfo, attributeInfo, displayName, smallIcon, largeIcon,
            tvi);
    
    this.dynamicAttrsMapName = mapName;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:20,代码来源:JasperTagInfo.java

示例2: getTagInfo

import javax.servlet.jsp.tagext.TagAttributeInfo; //导入依赖的package包/类
public TagInfo getTagInfo() throws JasperException {

            if (name == null) {
                // XXX Get it from tag file name
            }

            if (bodycontent == null) {
                bodycontent = TagInfo.BODY_CONTENT_SCRIPTLESS;
            }

            String tagClassName = JspUtil.getTagHandlerClassName(
                    path, tagLibInfo.getReliableURN(), err);

            TagVariableInfo[] tagVariableInfos = new TagVariableInfo[variableVector
                    .size()];
            variableVector.copyInto(tagVariableInfos);

            TagAttributeInfo[] tagAttributeInfo = new TagAttributeInfo[attributeVector
                    .size()];
            attributeVector.copyInto(tagAttributeInfo);

            return new JasperTagInfo(name, tagClassName, bodycontent,
                    description, tagLibInfo, tei, tagAttributeInfo,
                    displayName, smallIcon, largeIcon, tagVariableInfos,
                    dynamicAttrsMapName);
        }
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:27,代码来源:TagFileProcessor.java

示例3: checkUniqueName

import javax.servlet.jsp.tagext.TagAttributeInfo; //导入依赖的package包/类
private void checkUniqueName(String name, String type, Node n,
        TagAttributeInfo attr) throws JasperException {

    HashMap<String, NameEntry> table = (VAR_NAME_FROM.equals(type)) ? nameFromTable : nameTable;
    NameEntry nameEntry = table.get(name);
    if (nameEntry != null) {
        if (!TAG_DYNAMIC.equals(type) ||
                !TAG_DYNAMIC.equals(nameEntry.getType())) {
            int line = nameEntry.getNode().getStart().getLineNumber();
            err.jspError(n, "jsp.error.tagfile.nameNotUnique", type,
                    nameEntry.getType(), Integer.toString(line));
        }
    } else {
        table.put(name, new NameEntry(type, n, attr));
    }
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:17,代码来源:TagFileProcessor.java

示例4: postCheck

import javax.servlet.jsp.tagext.TagAttributeInfo; //导入依赖的package包/类
/**
 * Perform miscellaneous checks after the nodes are visited.
 */
void postCheck() throws JasperException {
    // Check that var.name-from-attributes has valid values.
    for (Entry<String, NameEntry> entry : nameFromTable.entrySet()) {
        String key = entry.getKey();
        NameEntry nameEntry = nameTable.get(key);
        NameEntry nameFromEntry = entry.getValue();
        Node nameFromNode = nameFromEntry.getNode();
        if (nameEntry == null) {
            err.jspError(nameFromNode,
                    "jsp.error.tagfile.nameFrom.noAttribute", key);
        } else {
            Node node = nameEntry.getNode();
            TagAttributeInfo tagAttr = nameEntry.getTagAttributeInfo();
            if (!"java.lang.String".equals(tagAttr.getTypeName())
                    || !tagAttr.isRequired()
                    || tagAttr.canBeRequestTime()) {
                err.jspError(nameFromNode,
                        "jsp.error.tagfile.nameFrom.badAttribute",
                        key, Integer.toString(node.getStart()
                                .getLineNumber()));
            }
        }
    }
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:28,代码来源:TagFileProcessor.java

示例5: getTagInfo

import javax.servlet.jsp.tagext.TagAttributeInfo; //导入依赖的package包/类
public TagInfo getTagInfo() throws JasperException {

			if (name == null) {
				// XXX Get it from tag file name
			}

			if (bodycontent == null) {
				bodycontent = TagInfo.BODY_CONTENT_SCRIPTLESS;
			}

			String tagClassName = JspUtil.getTagHandlerClassName(path, tagLibInfo.getReliableURN(), err);

			TagVariableInfo[] tagVariableInfos = new TagVariableInfo[variableVector.size()];
			variableVector.copyInto(tagVariableInfos);

			TagAttributeInfo[] tagAttributeInfo = new TagAttributeInfo[attributeVector.size()];
			attributeVector.copyInto(tagAttributeInfo);

			return new JasperTagInfo(name, tagClassName, bodycontent, description, tagLibInfo, tei, tagAttributeInfo,
					displayName, smallIcon, largeIcon, tagVariableInfos, dynamicAttrsMapName);
		}
 
开发者ID:how2j,项目名称:lazycat,代码行数:22,代码来源:TagFileProcessor.java

示例6: postCheck

import javax.servlet.jsp.tagext.TagAttributeInfo; //导入依赖的package包/类
/**
 * Perform miscellaneous checks after the nodes are visited.
 */
void postCheck() throws JasperException {
	// Check that var.name-from-attributes has valid values.
	for (Entry<String, NameEntry> entry : nameFromTable.entrySet()) {
		String key = entry.getKey();
		NameEntry nameEntry = nameTable.get(key);
		NameEntry nameFromEntry = entry.getValue();
		Node nameFromNode = nameFromEntry.getNode();
		if (nameEntry == null) {
			err.jspError(nameFromNode, "jsp.error.tagfile.nameFrom.noAttribute", key);
		} else {
			Node node = nameEntry.getNode();
			TagAttributeInfo tagAttr = nameEntry.getTagAttributeInfo();
			if (!"java.lang.String".equals(tagAttr.getTypeName()) || !tagAttr.isRequired()
					|| tagAttr.canBeRequestTime()) {
				err.jspError(nameFromNode, "jsp.error.tagfile.nameFrom.badAttribute", key,
						Integer.toString(node.getStart().getLineNumber()));
			}
		}
	}
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:24,代码来源:TagFileProcessor.java

示例7: checkUniqueName

import javax.servlet.jsp.tagext.TagAttributeInfo; //导入依赖的package包/类
private void checkUniqueName(String name, Name type, Node n,
                             TagAttributeInfo attr)
        throws JasperException {

    HashMap<String, NameEntry> table =
        (type == Name.VAR_NAME_FROM)? nameFromTable: nameTable;
    NameEntry nameEntry = table.get(name);
    if (nameEntry != null) {
        if (type != Name.TAG_DYNAMIC
                || nameEntry.getType() != Name.TAG_DYNAMIC) {
            int line = nameEntry.getNode().getStart().getLineNumber();
            err.jspError(n, "jsp.error.tagfile.nameNotUnique",
                type.getAttribute(), type.getDirective(),
                nameEntry.getType().getAttribute(),
                nameEntry.getType().getDirective(),
                Integer.toString(line));
        }
    } else {
        table.put(name, new NameEntry(type, n, attr));
    }
}
 
开发者ID:eclipse,项目名称:packagedrone,代码行数:22,代码来源:TagFileProcessor.java

示例8: checkUniqueName

import javax.servlet.jsp.tagext.TagAttributeInfo; //导入依赖的package包/类
private void checkUniqueName(String name, String type, Node n,
        TagAttributeInfo attr) throws JasperException {

    HashMap<String, NameEntry> table = (type == VAR_NAME_FROM) ? nameFromTable : nameTable;
    NameEntry nameEntry = table.get(name);
    if (nameEntry != null) {
        if (!TAG_DYNAMIC.equals(type) ||
                !TAG_DYNAMIC.equals(nameEntry.getType())) {
            int line = nameEntry.getNode().getStart().getLineNumber();
            err.jspError(n, "jsp.error.tagfile.nameNotUnique", type,
                    nameEntry.getType(), Integer.toString(line));
        }
    } else {
        table.put(name, new NameEntry(type, n, attr));
    }
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:17,代码来源:TagFileProcessor.java

示例9: postCheck

import javax.servlet.jsp.tagext.TagAttributeInfo; //导入依赖的package包/类
/**
 * Perform miscellaneous checks after the nodes are visited.
 */
void postCheck() throws JasperException {
    // Check that var.name-from-attributes has valid values.
    Iterator<String> iter = nameFromTable.keySet().iterator();
    while (iter.hasNext()) {
        String nameFrom = iter.next();
        NameEntry nameEntry = nameTable.get(nameFrom);
        NameEntry nameFromEntry = nameFromTable.get(nameFrom);
        Node nameFromNode = nameFromEntry.getNode();
        if (nameEntry == null) {
            err.jspError(nameFromNode,
                    "jsp.error.tagfile.nameFrom.noAttribute", nameFrom);
        } else {
            Node node = nameEntry.getNode();
            TagAttributeInfo tagAttr = nameEntry.getTagAttributeInfo();
            if (!"java.lang.String".equals(tagAttr.getTypeName())
                    || !tagAttr.isRequired()
                    || tagAttr.canBeRequestTime()) {
                err.jspError(nameFromNode,
                        "jsp.error.tagfile.nameFrom.badAttribute",
                        nameFrom, Integer.toString(node.getStart()
                                .getLineNumber()));
            }
        }
    }
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:29,代码来源:TagFileProcessor.java

示例10: checkIfAttributeIsJspFragment

import javax.servlet.jsp.tagext.TagAttributeInfo; //导入依赖的package包/类
/**
 * Checks to see if the attribute of the given name is of type
 * JspFragment.
 */
public boolean checkIfAttributeIsJspFragment(String name) {
    boolean result = false;

    TagAttributeInfo[] attributes = tagInfo.getAttributes();
    for (int i = 0; i < attributes.length; i++) {
        if (attributes[i].getName().equals(name)
                && attributes[i].isFragment()) {
            result = true;
            break;
        }
    }

    return result;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:19,代码来源:Node.java

示例11: JspAttribute

import javax.servlet.jsp.tagext.TagAttributeInfo; //导入依赖的package包/类
JspAttribute(TagAttributeInfo tai, String qName, String uri,
        String localName, String value, boolean expr, ELNode.Nodes el,
        boolean dyn) {
    this.qName = qName;
    this.uri = uri;
    this.localName = localName;
    this.value = value;
    this.namedAttributeNode = null;
    this.expression = expr;
    this.el = el;
    this.dynamic = dyn;
    this.namedAttribute = false;
    this.tai = tai;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:15,代码来源:Node.java

示例12: TagFileDirectiveVisitor

import javax.servlet.jsp.tagext.TagAttributeInfo; //导入依赖的package包/类
public TagFileDirectiveVisitor(Compiler compiler,
        TagLibraryInfo tagLibInfo, String name, String path) {
    err = compiler.getErrorDispatcher();
    this.tagLibInfo = tagLibInfo;
    this.name = name;
    this.path = path;
    attributeVector = new Vector<TagAttributeInfo>();
    variableVector = new Vector<TagVariableInfo>();
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:10,代码来源:TagFileProcessor.java

示例13: getTagAttributeInfo

import javax.servlet.jsp.tagext.TagAttributeInfo; //导入依赖的package包/类
public TagAttributeInfo getTagAttributeInfo(String name) {
    TagInfo info = this.getTagInfo();
    if (info == null)
        return null;
    TagAttributeInfo[] tai = info.getAttributes();
    for (int i = 0; i < tai.length; i++) {
        if (tai[i].getName().equals(name)) {
            return tai[i];
        }
    }
    return null;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:13,代码来源:Node.java

示例14: checkUniqueName

import javax.servlet.jsp.tagext.TagAttributeInfo; //导入依赖的package包/类
private void checkUniqueName(String name, String type, Node n,
        TagAttributeInfo attr) throws JasperException {

    HashMap table = (type == VAR_NAME_FROM) ? nameFromTable : nameTable;
    NameEntry nameEntry = (NameEntry) table.get(name);
    if (nameEntry != null) {
        if (type != TAG_DYNAMIC || nameEntry.getType() != TAG_DYNAMIC) {
            int line = nameEntry.getNode().getStart().getLineNumber();
            err.jspError(n, "jsp.error.tagfile.nameNotUnique", type,
                    nameEntry.getType(), Integer.toString(line));
        }
    } else {
        table.put(name, new NameEntry(type, n, attr));
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:TagFileProcessor.java

示例15: postCheck

import javax.servlet.jsp.tagext.TagAttributeInfo; //导入依赖的package包/类
/**
 * Perform miscellean checks after the nodes are visited.
 */
void postCheck() throws JasperException {
    // Check that var.name-from-attributes has valid values.
    Iterator iter = nameFromTable.keySet().iterator();
    while (iter.hasNext()) {
        String nameFrom = (String) iter.next();
        NameEntry nameEntry = (NameEntry) nameTable.get(nameFrom);
        NameEntry nameFromEntry = (NameEntry) nameFromTable
                .get(nameFrom);
        Node nameFromNode = nameFromEntry.getNode();
        if (nameEntry == null) {
            err.jspError(nameFromNode,
                    "jsp.error.tagfile.nameFrom.noAttribute", nameFrom);
        } else {
            Node node = nameEntry.getNode();
            TagAttributeInfo tagAttr = nameEntry.getTagAttributeInfo();
            if (!"java.lang.String".equals(tagAttr.getTypeName())
                    || !tagAttr.isRequired()
                    || tagAttr.canBeRequestTime()) {
                err.jspError(nameFromNode,
                        "jsp.error.tagfile.nameFrom.badAttribute",
                        nameFrom, Integer.toString(node.getStart()
                                .getLineNumber()));
            }
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:30,代码来源:TagFileProcessor.java


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