Package org.apache.jasper.compiler
Class TagFileProcessor.TagFileDirectiveVisitor
- java.lang.Object
-
- org.apache.jasper.compiler.Node.Visitor
-
- org.apache.jasper.compiler.TagFileProcessor.TagFileDirectiveVisitor
-
- Enclosing class:
- TagFileProcessor
private static class TagFileProcessor.TagFileDirectiveVisitor extends Node.Visitor
A visitor the tag file
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
TagFileProcessor.TagFileDirectiveVisitor.Name
(package private) static class
TagFileProcessor.TagFileDirectiveVisitor.NameEntry
-
Field Summary
Fields Modifier and Type Field Description private static JspUtil.ValidAttribute[]
attributeDirectiveAttrs
private java.util.List<TagAttributeInfo>
attributeVector
private java.lang.String
bodycontent
private java.lang.String
description
private java.lang.String
displayName
private java.lang.String
dynamicAttrsMapName
private ErrorDispatcher
err
private java.lang.String
example
private java.lang.Double
jspVersionDouble
private java.lang.String
largeIcon
private java.lang.String
name
private java.util.HashMap<java.lang.String,TagFileProcessor.TagFileDirectiveVisitor.NameEntry>
nameFromTable
private java.util.HashMap<java.lang.String,TagFileProcessor.TagFileDirectiveVisitor.NameEntry>
nameTable
private java.lang.String
path
private java.lang.String
smallIcon
private static JspUtil.ValidAttribute[]
tagDirectiveAttrs
private TagLibraryInfo
tagLibInfo
private TagExtraInfo
tei
private static JspUtil.ValidAttribute[]
variableDirectiveAttrs
private java.util.List<TagVariableInfo>
variableVector
-
Constructor Summary
Constructors Constructor Description TagFileDirectiveVisitor(Compiler compiler, TagLibraryInfo tagLibInfo, java.lang.String name, java.lang.String path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.String
checkConflict(Node n, java.lang.String oldAttrValue, java.lang.String attr)
private void
checkUniqueName(java.lang.String name, TagFileProcessor.TagFileDirectiveVisitor.Name type, Node n)
Reports a translation error if names specified in attributes of directives are not unique in this translation unit.private void
checkUniqueName(java.lang.String name, TagFileProcessor.TagFileDirectiveVisitor.Name type, Node n, TagAttributeInfo attr)
TagInfo
getTagInfo()
(package private) void
postCheck()
Perform miscelleaneous checks after the nodes are visited.void
visit(Node.AttributeDirective n)
void
visit(Node.JspRoot n)
void
visit(Node.TagDirective n)
void
visit(Node.VariableDirective n)
-
-
-
Field Detail
-
tagDirectiveAttrs
private static final JspUtil.ValidAttribute[] tagDirectiveAttrs
-
attributeDirectiveAttrs
private static final JspUtil.ValidAttribute[] attributeDirectiveAttrs
-
variableDirectiveAttrs
private static final JspUtil.ValidAttribute[] variableDirectiveAttrs
-
err
private ErrorDispatcher err
-
tagLibInfo
private TagLibraryInfo tagLibInfo
-
name
private java.lang.String name
-
path
private java.lang.String path
-
tei
private TagExtraInfo tei
-
bodycontent
private java.lang.String bodycontent
-
description
private java.lang.String description
-
displayName
private java.lang.String displayName
-
smallIcon
private java.lang.String smallIcon
-
largeIcon
private java.lang.String largeIcon
-
dynamicAttrsMapName
private java.lang.String dynamicAttrsMapName
-
example
private java.lang.String example
-
attributeVector
private java.util.List<TagAttributeInfo> attributeVector
-
variableVector
private java.util.List<TagVariableInfo> variableVector
-
nameTable
private java.util.HashMap<java.lang.String,TagFileProcessor.TagFileDirectiveVisitor.NameEntry> nameTable
-
nameFromTable
private java.util.HashMap<java.lang.String,TagFileProcessor.TagFileDirectiveVisitor.NameEntry> nameFromTable
-
jspVersionDouble
private java.lang.Double jspVersionDouble
-
-
Constructor Detail
-
TagFileDirectiveVisitor
public TagFileDirectiveVisitor(Compiler compiler, TagLibraryInfo tagLibInfo, java.lang.String name, java.lang.String path)
-
-
Method Detail
-
visit
public void visit(Node.JspRoot n) throws JasperException
- Overrides:
visit
in classNode.Visitor
- Throws:
JasperException
-
visit
public void visit(Node.TagDirective n) throws JasperException
- Overrides:
visit
in classNode.Visitor
- Throws:
JasperException
-
checkConflict
private java.lang.String checkConflict(Node n, java.lang.String oldAttrValue, java.lang.String attr) throws JasperException
- Throws:
JasperException
-
visit
public void visit(Node.AttributeDirective n) throws JasperException
- Overrides:
visit
in classNode.Visitor
- Throws:
JasperException
-
visit
public void visit(Node.VariableDirective n) throws JasperException
- Overrides:
visit
in classNode.Visitor
- Throws:
JasperException
-
getTagInfo
public TagInfo getTagInfo() throws JasperException
- Throws:
JasperException
-
checkUniqueName
private void checkUniqueName(java.lang.String name, TagFileProcessor.TagFileDirectiveVisitor.Name type, Node n) throws JasperException
Reports a translation error if names specified in attributes of directives are not unique in this translation unit. The value of the following attributes must be unique. 1. 'name' attribute of an attribute directive 2. 'name-given' attribute of a variable directive 3. 'alias' attribute of variable directive 4. 'dynamic-attributes' of a tag directive except that 'dynamic-attributes' can (and must) have the same value when it appears in multiple tag directives. Also, 'name-from' attribute of a variable directive cannot have the same value as that from another variable directive.- Throws:
JasperException
-
checkUniqueName
private void checkUniqueName(java.lang.String name, TagFileProcessor.TagFileDirectiveVisitor.Name type, Node n, TagAttributeInfo attr) throws JasperException
- Throws:
JasperException
-
postCheck
void postCheck() throws JasperException
Perform miscelleaneous checks after the nodes are visited.- Throws:
JasperException
-
-