Java 类javax.servlet.jsp.tagext.TagVariableInfo 实例源码

项目:tomcat7    文件:JasperTagInfo.java   
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;
}
项目:tomcat7    文件:TagFileProcessor.java   
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);
        }
项目:lams    文件:TagFileProcessor.java   
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);
        }
项目:apache-tomcat-7.0.73-with-comment    文件:JasperTagInfo.java   
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;
}
项目:apache-tomcat-7.0.73-with-comment    文件:TagFileProcessor.java   
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);
        }
项目:lazycat    文件:TagFileProcessor.java   
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);
        }
项目:class-guard    文件:JasperTagInfo.java   
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;
}
项目:class-guard    文件:TagFileProcessor.java   
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);
        }
项目:apache-tomcat-7.0.57    文件:JasperTagInfo.java   
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;
}
项目:apache-tomcat-7.0.57    文件:TagFileProcessor.java   
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);
        }
项目:apache-tomcat-7.0.57    文件:JasperTagInfo.java   
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;
}
项目:apache-tomcat-7.0.57    文件:TagFileProcessor.java   
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);
        }
项目:WBSAirback    文件:JasperTagInfo.java   
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;
}
项目:WBSAirback    文件:TagFileProcessor.java   
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);
        }
项目:tomcat7    文件:Generator.java   
private void declareScriptingVars(Node.CustomTag n, int scope) {
    if (isFragment) {
        // No need to declare Java variables, if we inside a
        // JspFragment, because a fragment is always scriptless.
        return;
    }

    List<Object> vec = n.getScriptingVars(scope);
    if (vec != null) {
        for (int i = 0; i < vec.size(); i++) {
            Object elem = vec.get(i);
            if (elem instanceof VariableInfo) {
                VariableInfo varInfo = (VariableInfo) elem;
                if (varInfo.getDeclare()) {
                    out.printin(varInfo.getClassName());
                    out.print(" ");
                    out.print(varInfo.getVarName());
                    out.println(" = null;");
                }
            } else {
                TagVariableInfo tagVarInfo = (TagVariableInfo) elem;
                if (tagVarInfo.getDeclare()) {
                    String varName = tagVarInfo.getNameGiven();
                    if (varName == null) {
                        varName = n.getTagData().getAttributeString(
                                tagVarInfo.getNameFromAttribute());
                    } else if (tagVarInfo.getNameFromAttribute() != null) {
                        // alias
                        continue;
                    }
                    out.printin(tagVarInfo.getClassName());
                    out.print(" ");
                    out.print(varName);
                    out.println(" = null;");
                }
            }
        }
    }
}
项目:tomcat7    文件:Generator.java   
/**
 * Generate code to create a map for the alias variables
 *
 * @return the name of the map
 */
private String generateAliasMap(Node.CustomTag n,
        String tagHandlerVar) {

    TagVariableInfo[] tagVars = n.getTagVariableInfos();
    String aliasMapVar = null;

    boolean aliasSeen = false;
    for (int i = 0; i < tagVars.length; i++) {

        String nameFrom = tagVars[i].getNameFromAttribute();
        if (nameFrom != null) {
            String aliasedName = n.getAttributeValue(nameFrom);
            if (aliasedName == null)
                continue;

            if (!aliasSeen) {
                out.printin("java.util.HashMap ");
                aliasMapVar = tagHandlerVar + "_aliasMap";
                out.print(aliasMapVar);
                out.println(" = new java.util.HashMap();");
                aliasSeen = true;
            }
            out.printin(aliasMapVar);
            out.print(".put(");
            out.print(quote(tagVars[i].getNameGiven()));
            out.print(", ");
            out.print(quote(aliasedName));
            out.println(");");
        }
    }
    return aliasMapVar;
}
项目:tomcat7    文件:TagFileProcessor.java   
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>();
}
项目:lams    文件:Generator.java   
private void declareScriptingVars(Node.CustomTag n, int scope) {

            Vector vec = n.getScriptingVars(scope);
            if (vec != null) {
                for (int i = 0; i < vec.size(); i++) {
                    Object elem = vec.elementAt(i);
                    if (elem instanceof VariableInfo) {
                        VariableInfo varInfo = (VariableInfo) elem;
                        if (varInfo.getDeclare()) {
                            out.printin(varInfo.getClassName());
                            out.print(" ");
                            out.print(varInfo.getVarName());
                            out.println(" = null;");
                        }
                    } else {
                        TagVariableInfo tagVarInfo = (TagVariableInfo) elem;
                        if (tagVarInfo.getDeclare()) {
                            String varName = tagVarInfo.getNameGiven();
                            if (varName == null) {
                                varName = n.getTagData().getAttributeString(
                                        tagVarInfo.getNameFromAttribute());
                            } else if (tagVarInfo.getNameFromAttribute() != null) {
                                // alias
                                continue;
                            }
                            out.printin(tagVarInfo.getClassName());
                            out.print(" ");
                            out.print(varName);
                            out.println(" = null;");
                        }
                    }
                }
            }
        }
项目:lams    文件:Generator.java   
private void syncScriptingVars(Node.CustomTag n, int scope) {
    TagVariableInfo[] tagVarInfos = n.getTagVariableInfos();
    VariableInfo[] varInfos = n.getVariableInfos();

    if ((varInfos.length == 0) && (tagVarInfos.length == 0)) {
        return;
    }

    if (varInfos.length > 0) {
        for (int i = 0; i < varInfos.length; i++) {
            if (varInfos[i].getScope() == scope) {
                out.printin(varInfos[i].getVarName());
                out.print(" = (");
                out.print(varInfos[i].getClassName());
                out.print(") _jspx_page_context.findAttribute(");
                out.print(quote(varInfos[i].getVarName()));
                out.println(");");
            }
        }
    } else {
        for (int i = 0; i < tagVarInfos.length; i++) {
            if (tagVarInfos[i].getScope() == scope) {
                String name = tagVarInfos[i].getNameGiven();
                if (name == null) {
                    name = n.getTagData().getAttributeString(
                            tagVarInfos[i].getNameFromAttribute());
                } else if (tagVarInfos[i].getNameFromAttribute() != null) {
                    // alias
                    continue;
                }
                out.printin(name);
                out.print(" = (");
                out.print(tagVarInfos[i].getClassName());
                out.print(") _jspx_page_context.findAttribute(");
                out.print(quote(name));
                out.println(");");
            }
        }
    }
}
项目:lams    文件:Generator.java   
/**
 * Generate code to create a map for the alias variables
 *
 * @return the name of the map
 */
private String generateAliasMap(Node.CustomTag n, String tagHandlerVar)
        throws JasperException {

    TagVariableInfo[] tagVars = n.getTagVariableInfos();
    String aliasMapVar = null;

    boolean aliasSeen = false;
    for (int i = 0; i < tagVars.length; i++) {

        String nameFrom = tagVars[i].getNameFromAttribute();
        if (nameFrom != null) {
            String aliasedName = n.getAttributeValue(nameFrom);
            if (aliasedName == null)
                continue;

            if (!aliasSeen) {
                out.printin("java.util.HashMap ");
                aliasMapVar = tagHandlerVar + "_aliasMap";
                out.print(aliasMapVar);
                out.println(" = new java.util.HashMap();");
                aliasSeen = true;
            }
            out.printin(aliasMapVar);
            out.print(".put(");
            out.print(quote(tagVars[i].getNameGiven()));
            out.print(", ");
            out.print(quote(aliasedName));
            out.println(");");
        }
    }
    return aliasMapVar;
}
项目:apache-tomcat-7.0.73-with-comment    文件:Generator.java   
private void declareScriptingVars(Node.CustomTag n, int scope) {
    if (isFragment) {
        // No need to declare Java variables, if we inside a
        // JspFragment, because a fragment is always scriptless.
        return;
    }

    List<Object> vec = n.getScriptingVars(scope);
    if (vec != null) {
        for (int i = 0; i < vec.size(); i++) {
            Object elem = vec.get(i);
            if (elem instanceof VariableInfo) {
                VariableInfo varInfo = (VariableInfo) elem;
                if (varInfo.getDeclare()) {
                    out.printin(varInfo.getClassName());
                    out.print(" ");
                    out.print(varInfo.getVarName());
                    out.println(" = null;");
                }
            } else {
                TagVariableInfo tagVarInfo = (TagVariableInfo) elem;
                if (tagVarInfo.getDeclare()) {
                    String varName = tagVarInfo.getNameGiven();
                    if (varName == null) {
                        varName = n.getTagData().getAttributeString(
                                tagVarInfo.getNameFromAttribute());
                    } else if (tagVarInfo.getNameFromAttribute() != null) {
                        // alias
                        continue;
                    }
                    out.printin(tagVarInfo.getClassName());
                    out.print(" ");
                    out.print(varName);
                    out.println(" = null;");
                }
            }
        }
    }
}
项目:apache-tomcat-7.0.73-with-comment    文件:Generator.java   
/**
 * Generate code to create a map for the alias variables
 *
 * @return the name of the map
 */
private String generateAliasMap(Node.CustomTag n,
        String tagHandlerVar) {

    TagVariableInfo[] tagVars = n.getTagVariableInfos();
    String aliasMapVar = null;

    boolean aliasSeen = false;
    for (int i = 0; i < tagVars.length; i++) {

        String nameFrom = tagVars[i].getNameFromAttribute();
        if (nameFrom != null) {
            String aliasedName = n.getAttributeValue(nameFrom);
            if (aliasedName == null)
                continue;

            if (!aliasSeen) {
                out.printin("java.util.HashMap ");
                aliasMapVar = tagHandlerVar + "_aliasMap";
                out.print(aliasMapVar);
                out.println(" = new java.util.HashMap();");
                aliasSeen = true;
            }
            out.printin(aliasMapVar);
            out.print(".put(");
            out.print(quote(tagVars[i].getNameGiven()));
            out.print(", ");
            out.print(quote(aliasedName));
            out.println(");");
        }
    }
    return aliasMapVar;
}
项目:apache-tomcat-7.0.73-with-comment    文件:TagFileProcessor.java   
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>();
}
项目:lazycat    文件:JasperTagInfo.java   
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;
}
项目:lazycat    文件:Generator.java   
private void declareScriptingVars(Node.CustomTag n, int scope) {
    if (isFragment) {
        // No need to declare Java variables, if we inside a
        // JspFragment, because a fragment is always scriptless.
        return;
    }

    List<Object> vec = n.getScriptingVars(scope);
    if (vec != null) {
        for (int i = 0; i < vec.size(); i++) {
            Object elem = vec.get(i);
            if (elem instanceof VariableInfo) {
                VariableInfo varInfo = (VariableInfo) elem;
                if (varInfo.getDeclare()) {
                    out.printin(varInfo.getClassName());
                    out.print(" ");
                    out.print(varInfo.getVarName());
                    out.println(" = null;");
                }
            } else {
                TagVariableInfo tagVarInfo = (TagVariableInfo) elem;
                if (tagVarInfo.getDeclare()) {
                    String varName = tagVarInfo.getNameGiven();
                    if (varName == null) {
                        varName = n.getTagData().getAttributeString(tagVarInfo.getNameFromAttribute());
                    } else if (tagVarInfo.getNameFromAttribute() != null) {
                        // alias
                        continue;
                    }
                    out.printin(tagVarInfo.getClassName());
                    out.print(" ");
                    out.print(varName);
                    out.println(" = null;");
                }
            }
        }
    }
}
项目:lazycat    文件:Generator.java   
/**
 * Generate code to create a map for the alias variables
 *
 * @return the name of the map
 */
private String generateAliasMap(Node.CustomTag n, String tagHandlerVar) {

    TagVariableInfo[] tagVars = n.getTagVariableInfos();
    String aliasMapVar = null;

    boolean aliasSeen = false;
    for (int i = 0; i < tagVars.length; i++) {

        String nameFrom = tagVars[i].getNameFromAttribute();
        if (nameFrom != null) {
            String aliasedName = n.getAttributeValue(nameFrom);
            if (aliasedName == null)
                continue;

            if (!aliasSeen) {
                out.printin("java.util.HashMap ");
                aliasMapVar = tagHandlerVar + "_aliasMap";
                out.print(aliasMapVar);
                out.println(" = new java.util.HashMap();");
                aliasSeen = true;
            }
            out.printin(aliasMapVar);
            out.print(".put(");
            out.print(quote(tagVars[i].getNameGiven()));
            out.print(", ");
            out.print(quote(aliasedName));
            out.println(");");
        }
    }
    return aliasMapVar;
}
项目:lazycat    文件:TagFileProcessor.java   
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>();
}
项目:beyondj    文件:Generator.java   
private void declareScriptingVars(Node.CustomTag n, int scope) {
    if (isFragment) {
        // No need to declare Java variables, if we inside a
        // JspFragment, because a fragment is always scriptless.
        return;
    }

    List<Object> vec = n.getScriptingVars(scope);
    if (vec != null) {
        for (int i = 0; i < vec.size(); i++) {
            Object elem = vec.get(i);
            if (elem instanceof VariableInfo) {
                VariableInfo varInfo = (VariableInfo) elem;
                if (varInfo.getDeclare()) {
                    out.printin(varInfo.getClassName());
                    out.print(" ");
                    out.print(varInfo.getVarName());
                    out.println(" = null;");
                }
            } else {
                TagVariableInfo tagVarInfo = (TagVariableInfo) elem;
                if (tagVarInfo.getDeclare()) {
                    String varName = tagVarInfo.getNameGiven();
                    if (varName == null) {
                        varName = n.getTagData().getAttributeString(
                                tagVarInfo.getNameFromAttribute());
                    } else if (tagVarInfo.getNameFromAttribute() != null) {
                        // alias
                        continue;
                    }
                    out.printin(tagVarInfo.getClassName());
                    out.print(" ");
                    out.print(varName);
                    out.println(" = null;");
                }
            }
        }
    }
}
项目:beyondj    文件:Generator.java   
/**
 * Generate code to create a map for the alias variables
 *
 * @return the name of the map
 */
private String generateAliasMap(Node.CustomTag n,
        String tagHandlerVar) {

    TagVariableInfo[] tagVars = n.getTagVariableInfos();
    String aliasMapVar = null;

    boolean aliasSeen = false;
    for (int i = 0; i < tagVars.length; i++) {

        String nameFrom = tagVars[i].getNameFromAttribute();
        if (nameFrom != null) {
            String aliasedName = n.getAttributeValue(nameFrom);
            if (aliasedName == null)
                continue;

            if (!aliasSeen) {
                out.printin("java.util.HashMap ");
                aliasMapVar = tagHandlerVar + "_aliasMap";
                out.print(aliasMapVar);
                out.println(" = new java.util.HashMap();");
                aliasSeen = true;
            }
            out.printin(aliasMapVar);
            out.print(".put(");
            out.print(quote(tagVars[i].getNameGiven()));
            out.print(", ");
            out.print(quote(aliasedName));
            out.println(");");
        }
    }
    return aliasMapVar;
}
项目:packagedrone    文件:Generator.java   
private void declareScriptingVars(Node.CustomTag n, int scope) {

            // Skip if the page is scriptless
            if (pageInfo.isScriptless()) return;

            ArrayList<Object> vec = n.getScriptingVars(scope);
            if (vec != null) {
                for (int i = 0; i < vec.size(); i++) {
                    Object elem = vec.get(i);
                    if (elem instanceof VariableInfo) {
                        VariableInfo varInfo = (VariableInfo)elem;
                        if (varInfo.getDeclare()) {
                            out.printin(varInfo.getClassName());
                            out.print(" ");
                            out.print(varInfo.getVarName());
                            out.println(" = null;");
                        }
                    } else {
                        TagVariableInfo tagVarInfo = (TagVariableInfo)elem;
                        if (tagVarInfo.getDeclare()) {
                            String varName = tagVarInfo.getNameGiven();
                            if (varName == null) {
                                varName =
                                    n.getTagData().getAttributeString(
                                        tagVarInfo.getNameFromAttribute());
                            } else if (
                                tagVarInfo.getNameFromAttribute() != null) {
                                // alias
                                continue;
                            }
                            out.printin(tagVarInfo.getClassName());
                            out.print(" ");
                            out.print(varName);
                            out.println(" = null;");
                        }
                    }
                }
            }
        }
项目:packagedrone    文件:Generator.java   
/**
 * Generate code to create a map for the alias variables
 * @return the name of the map
 */
private String generateAliasMap(Node.CustomTag n, String tagHandlerVar)
    throws JasperException {

    TagVariableInfo[] tagVars = n.getTagVariableInfos();
    String aliasMapVar = null;

    boolean aliasSeen = false;
    for (int i = 0; i < tagVars.length; i++) {

        String nameFrom = tagVars[i].getNameFromAttribute();
        if (nameFrom != null) {
            String aliasedName = n.getAttributeValue(nameFrom);
            if (aliasedName == null)
                continue;

            if (!aliasSeen) {
                out.printin("java.util.HashMap ");
                aliasMapVar = tagHandlerVar + "_aliasMap";
                out.print(aliasMapVar);
                out.println(" = new java.util.HashMap();");
                aliasSeen = true;
            }
            out.printin(aliasMapVar);
            out.print(".put(");
            out.print(quote(tagVars[i].getNameGiven()));
            out.print(", ");
            out.print(quote(aliasedName));
            out.println(");");
        }
    }
    return aliasMapVar;
}
项目:packagedrone    文件:TagFileProcessor.java   
public TagFileDirectiveVisitor(Compiler compiler,
                               TagLibraryInfo tagLibInfo,
                               String name,
                               String path) {
    err = compiler.getErrorDispatcher();
    this.tagLibInfo = tagLibInfo;
    this.name = name;
    this.path = path;
    attributeVector = new ArrayList<TagAttributeInfo>();
    variableVector = new ArrayList<TagVariableInfo>();

    jspVersionDouble = Double.valueOf(tagLibInfo.getRequiredVersion());
}
项目:packagedrone    文件:TagFileProcessor.java   
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, err);

            TagVariableInfo[] tagVariableInfos
                = variableVector.toArray(new TagVariableInfo[0]);

            TagAttributeInfo[] tagAttributeInfo
                = attributeVector.toArray(new TagAttributeInfo[0]);

            return new JasperTagInfo(name,
                   tagClassName,
                   bodycontent,
                   description,
                   tagLibInfo,
                   tei,
                   tagAttributeInfo,
                   displayName,
                   smallIcon,
                   largeIcon,
                   tagVariableInfos,
                   dynamicAttrsMapName);
        }
项目:class-guard    文件:Generator.java   
private void declareScriptingVars(Node.CustomTag n, int scope) {
    if (isFragment) {
        // No need to declare Java variables, if we inside a
        // JspFragment, because a fragment is always scriptless.
        return;
    }

    List<Object> vec = n.getScriptingVars(scope);
    if (vec != null) {
        for (int i = 0; i < vec.size(); i++) {
            Object elem = vec.get(i);
            if (elem instanceof VariableInfo) {
                VariableInfo varInfo = (VariableInfo) elem;
                if (varInfo.getDeclare()) {
                    out.printin(varInfo.getClassName());
                    out.print(" ");
                    out.print(varInfo.getVarName());
                    out.println(" = null;");
                }
            } else {
                TagVariableInfo tagVarInfo = (TagVariableInfo) elem;
                if (tagVarInfo.getDeclare()) {
                    String varName = tagVarInfo.getNameGiven();
                    if (varName == null) {
                        varName = n.getTagData().getAttributeString(
                                tagVarInfo.getNameFromAttribute());
                    } else if (tagVarInfo.getNameFromAttribute() != null) {
                        // alias
                        continue;
                    }
                    out.printin(tagVarInfo.getClassName());
                    out.print(" ");
                    out.print(varName);
                    out.println(" = null;");
                }
            }
        }
    }
}
项目:class-guard    文件:Generator.java   
/**
 * Generate code to create a map for the alias variables
 *
 * @return the name of the map
 */
private String generateAliasMap(Node.CustomTag n,
        String tagHandlerVar) {

    TagVariableInfo[] tagVars = n.getTagVariableInfos();
    String aliasMapVar = null;

    boolean aliasSeen = false;
    for (int i = 0; i < tagVars.length; i++) {

        String nameFrom = tagVars[i].getNameFromAttribute();
        if (nameFrom != null) {
            String aliasedName = n.getAttributeValue(nameFrom);
            if (aliasedName == null)
                continue;

            if (!aliasSeen) {
                out.printin("java.util.HashMap ");
                aliasMapVar = tagHandlerVar + "_aliasMap";
                out.print(aliasMapVar);
                out.println(" = new java.util.HashMap();");
                aliasSeen = true;
            }
            out.printin(aliasMapVar);
            out.print(".put(");
            out.print(quote(tagVars[i].getNameGiven()));
            out.print(", ");
            out.print(quote(aliasedName));
            out.println(");");
        }
    }
    return aliasMapVar;
}
项目:class-guard    文件:TagFileProcessor.java   
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>();
}
项目:package-drone    文件:Generator.java   
private void declareScriptingVars(Node.CustomTag n, int scope) {

            // Skip if the page is scriptless
            if (pageInfo.isScriptless()) return;

            ArrayList<Object> vec = n.getScriptingVars(scope);
            if (vec != null) {
                for (int i = 0; i < vec.size(); i++) {
                    Object elem = vec.get(i);
                    if (elem instanceof VariableInfo) {
                        VariableInfo varInfo = (VariableInfo)elem;
                        if (varInfo.getDeclare()) {
                            out.printin(varInfo.getClassName());
                            out.print(" ");
                            out.print(varInfo.getVarName());
                            out.println(" = null;");
                        }
                    } else {
                        TagVariableInfo tagVarInfo = (TagVariableInfo)elem;
                        if (tagVarInfo.getDeclare()) {
                            String varName = tagVarInfo.getNameGiven();
                            if (varName == null) {
                                varName =
                                    n.getTagData().getAttributeString(
                                        tagVarInfo.getNameFromAttribute());
                            } else if (
                                tagVarInfo.getNameFromAttribute() != null) {
                                // alias
                                continue;
                            }
                            out.printin(tagVarInfo.getClassName());
                            out.print(" ");
                            out.print(varName);
                            out.println(" = null;");
                        }
                    }
                }
            }
        }
项目:package-drone    文件:Generator.java   
/**
 * Generate code to create a map for the alias variables
 * @return the name of the map
 */
private String generateAliasMap(Node.CustomTag n, String tagHandlerVar)
    throws JasperException {

    TagVariableInfo[] tagVars = n.getTagVariableInfos();
    String aliasMapVar = null;

    boolean aliasSeen = false;
    for (int i = 0; i < tagVars.length; i++) {

        String nameFrom = tagVars[i].getNameFromAttribute();
        if (nameFrom != null) {
            String aliasedName = n.getAttributeValue(nameFrom);
            if (aliasedName == null)
                continue;

            if (!aliasSeen) {
                out.printin("java.util.HashMap ");
                aliasMapVar = tagHandlerVar + "_aliasMap";
                out.print(aliasMapVar);
                out.println(" = new java.util.HashMap();");
                aliasSeen = true;
            }
            out.printin(aliasMapVar);
            out.print(".put(");
            out.print(quote(tagVars[i].getNameGiven()));
            out.print(", ");
            out.print(quote(aliasedName));
            out.println(");");
        }
    }
    return aliasMapVar;
}
项目:package-drone    文件:TagFileProcessor.java   
public TagFileDirectiveVisitor(Compiler compiler,
                               TagLibraryInfo tagLibInfo,
                               String name,
                               String path) {
    err = compiler.getErrorDispatcher();
    this.tagLibInfo = tagLibInfo;
    this.name = name;
    this.path = path;
    attributeVector = new ArrayList<TagAttributeInfo>();
    variableVector = new ArrayList<TagVariableInfo>();

    jspVersionDouble = Double.valueOf(tagLibInfo.getRequiredVersion());
}
项目:package-drone    文件:TagFileProcessor.java   
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, err);

            TagVariableInfo[] tagVariableInfos
                = variableVector.toArray(new TagVariableInfo[0]);

            TagAttributeInfo[] tagAttributeInfo
                = attributeVector.toArray(new TagAttributeInfo[0]);

            return new JasperTagInfo(name,
                   tagClassName,
                   bodycontent,
                   description,
                   tagLibInfo,
                   tei,
                   tagAttributeInfo,
                   displayName,
                   smallIcon,
                   largeIcon,
                   tagVariableInfos,
                   dynamicAttrsMapName);
        }