Package org.apache.jasper.compiler
Class TagLibraryInfoImpl
java.lang.Object
javax.servlet.jsp.tagext.TagLibraryInfo
org.apache.jasper.compiler.TagLibraryInfoImpl
- All Implemented Interfaces:
TagConstants
Implementation of the TagLibraryInfo class from the JSP spec.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate JspCompilationContext
private ErrorDispatcher
private PageInfo
private ParserController
protected TagLibraryValidator
Fields inherited from class javax.servlet.jsp.tagext.TagLibraryInfo
functions, info, jspversion, prefix, shortname, tagFiles, tags, tlibversion, uri, urn
Fields inherited from interface org.apache.jasper.compiler.TagConstants
ATTRIBUTE_ACTION, ATTRIBUTE_DIRECTIVE_ACTION, BODY_ACTION, DECLARATION_ACTION, DIRECTIVE_ACTION, DOBODY_ACTION, ELEMENT_ACTION, EXPRESSION_ACTION, FALLBACK_ACTION, FORWARD_ACTION, GET_PROPERTY_ACTION, INCLUDE_ACTION, INCLUDE_DIRECTIVE_ACTION, INVOKE_ACTION, JSP_ATTRIBUTE_ACTION, JSP_ATTRIBUTE_DIRECTIVE_ACTION, JSP_BODY_ACTION, JSP_DECLARATION_ACTION, JSP_DOBODY_ACTION, JSP_ELEMENT_ACTION, JSP_EXPRESSION_ACTION, JSP_FALLBACK_ACTION, JSP_FORWARD_ACTION, JSP_GET_PROPERTY_ACTION, JSP_INCLUDE_ACTION, JSP_INCLUDE_DIRECTIVE_ACTION, JSP_INVOKE_ACTION, JSP_OUTPUT_ACTION, JSP_PAGE_DIRECTIVE_ACTION, JSP_PARAM_ACTION, JSP_PARAMS_ACTION, JSP_PLUGIN_ACTION, JSP_ROOT_ACTION, JSP_SCRIPTLET_ACTION, JSP_SET_PROPERTY_ACTION, JSP_TAG_DIRECTIVE_ACTION, JSP_TAGLIB_DIRECTIVE_ACTION, JSP_TEXT_ACTION, JSP_TEXT_ACTION_END, JSP_URI, JSP_USE_BEAN_ACTION, JSP_VARIABLE_DIRECTIVE_ACTION, OUTPUT_ACTION, PAGE_DIRECTIVE_ACTION, PARAM_ACTION, PARAMS_ACTION, PLUGIN_ACTION, ROOT_ACTION, SCRIPTLET_ACTION, SET_PROPERTY_ACTION, TAG_DIRECTIVE_ACTION, TAGLIB_DIRECTIVE_ACTION, TEXT_ACTION, URN_JSPTAGDIR, URN_JSPTLD, USE_BEAN_ACTION, VARIABLE_DIRECTIVE_ACTION
-
Constructor Summary
ConstructorsConstructorDescriptionTagLibraryInfoImpl
(String prefix, String uri, TagLibraryInfoImpl delegate, PageInfo pageInfo) Constructor which populates a TagLibraryInfoImpl from a given TagLibraryInfoImpl, and associates the new TagLibraryInfoImpl with the given translation unit (pageInfo).TagLibraryInfoImpl
(JspCompilationContext ctxt, ParserController pc, String prefix, String uriIn, String[] location, ErrorDispatcher err) Constructor which builds a TagLibraryInfoImpl by parsing a TLD. -
Method Summary
Modifier and TypeMethodDescriptionprivate TagAttributeInfo
createAttribute
(TreeNode elem, String jspVersion) private FunctionInfo
createFunctionInfo
(TreeNode elem) private String[]
createInitParam
(TreeNode elem) private TagFileInfo
createTagFileInfo
(TreeNode elem, String uri, URL jarFileUrl) private TagInfo
createTagInfo
(TreeNode elem, String jspVersion) private TagLibraryValidator
createValidator
(TreeNode elem) private TagVariableInfo
createVariable
(TreeNode elem) private String[]
generateTLDLocation
(String uri, JspCompilationContext ctxt) private InputStream
Returns an array of TagLibraryInfo objects representing the entire set of tag libraries (including this TagLibraryInfo) imported by taglib directives in the translation unit that references this TagLibraryInfo.The instance (if any) for the TagLibraryValidator class.private void
parseTLD
(JspCompilationContext ctxt, String uri, InputStream in, URL jarFileUrl) private final void
print
(String name, String value, PrintWriter w) toString()
Translation-time validation of the XML document associated with the JSP page.Methods inherited from class javax.servlet.jsp.tagext.TagLibraryInfo
getFunction, getFunctions, getInfoString, getPrefixString, getReliableURN, getRequiredVersion, getShortName, getTag, getTagFile, getTagFiles, getTags, getURI
-
Field Details
-
ctxt
-
err
-
parserController
-
pageInfo
-
tagLibraryValidator
-
-
Constructor Details
-
TagLibraryInfoImpl
public TagLibraryInfoImpl(String prefix, String uri, TagLibraryInfoImpl delegate, PageInfo pageInfo) Constructor which populates a TagLibraryInfoImpl from a given TagLibraryInfoImpl, and associates the new TagLibraryInfoImpl with the given translation unit (pageInfo).- Parameters:
prefix
- The taglib's namespace prefixuri
- The taglib's uridelegate
- The taglib from which the new TagLibraryInfoImpl is populatedpageInfo
- The translation unit with which the new TagLibraryInfoImpl is to be associated
-
TagLibraryInfoImpl
public TagLibraryInfoImpl(JspCompilationContext ctxt, ParserController pc, String prefix, String uriIn, String[] location, ErrorDispatcher err) throws JasperException Constructor which builds a TagLibraryInfoImpl by parsing a TLD.- Throws:
JasperException
-
-
Method Details
-
print
-
toString
-
getResourceAsStream
- Throws:
JasperException
-
getTagLibraryInfos
Returns an array of TagLibraryInfo objects representing the entire set of tag libraries (including this TagLibraryInfo) imported by taglib directives in the translation unit that references this TagLibraryInfo. If a tag library is imported more than once and bound to different prefices, only the TagLibraryInfo bound to the first prefix must be included in the returned array.- Specified by:
getTagLibraryInfos
in classTagLibraryInfo
- Returns:
- Array of TagLibraryInfo objects representing the entire set of tag libraries (including this TagLibraryInfo) imported by taglib directives in the translation unit that references this TagLibraryInfo.
- Since:
- 2.1
-
parseTLD
private void parseTLD(JspCompilationContext ctxt, String uri, InputStream in, URL jarFileUrl) throws JasperException - Throws:
JasperException
-
generateTLDLocation
- Throws:
JasperException
-
createTagInfo
- Throws:
JasperException
-
createTagFileInfo
private TagFileInfo createTagFileInfo(TreeNode elem, String uri, URL jarFileUrl) throws JasperException - Throws:
JasperException
-
createAttribute
- Throws:
JasperException
-
createVariable
- Throws:
JasperException
-
createValidator
- Throws:
JasperException
-
createInitParam
- Throws:
JasperException
-
createFunctionInfo
- Throws:
JasperException
-
getTagLibraryValidator
The instance (if any) for the TagLibraryValidator class.- Returns:
- The TagLibraryValidator instance, if any.
-
validate
Translation-time validation of the XML document associated with the JSP page. This is a convenience method on the associated TagLibraryValidator class.- Parameters:
thePage
- The JSP page object- Returns:
- A string indicating whether the page is valid or not.
-