FileDocCategorySizeDatePackage
TagLibraryInfo.javaAPI DocGlassfish v2 API9733Fri May 04 22:34:28 BST 2007javax.servlet.jsp.tagext

TagLibraryInfo

public abstract class TagLibraryInfo extends Object
Translation-time information associated with a taglib directive, and its underlying TLD file. Most of the information is directly from the TLD, except for the prefix and the uri values used in the taglib directive

Fields Summary
protected String
prefix
The prefix assigned to this taglib from the taglib directive.
protected String
uri
The value of the uri attribute from the taglib directive for this library.
protected javax.servlet.jsp.tagext.TagInfo[]
tags
An array describing the tags that are defined in this tag library.
protected javax.servlet.jsp.tagext.TagFileInfo[]
tagFiles
An array describing the tag files that are defined in this tag library.
protected FunctionInfo[]
functions
An array describing the functions that are defined in this tag library.
protected String
tlibversion
The version of the tag library.
protected String
jspversion
The version of the JSP specification this tag library is written to.
protected String
shortname
The preferred short name (prefix) as indicated in the TLD.
protected String
urn
The "reliable" URN indicated in the TLD.
protected String
info
Information (documentation) for this TLD.
Constructors Summary
protected TagLibraryInfo(String prefix, String uri)
Constructor.

param
prefix the prefix actually used by the taglib directive
param
uri the URI actually used by the taglib directive

	this.prefix = prefix;
	this.uri    = uri;
    
Methods Summary
public FunctionInfogetFunction(java.lang.String name)
Get the FunctionInfo for a given function name, looking through all the functions in this tag library.

param
name The name (no prefix) of the function
return
the FunctionInfo for the function with the given name, or null if no such function exists
since
JSP 2.0


        if (functions == null || functions.length == 0) {
            System.err.println("No functions");
            return null;
        }

        for (int i=0; i < functions.length; i++) {
            if (functions[i].getName().equals(name)) {
                return functions[i];
            }
        }
        return null;
    
public FunctionInfo[]getFunctions()
An array describing the functions that are defined in this tag library.

return
the functions defined in this tag library, or a zero length array if the tag library defines no functions.
since
JSP 2.0

        return functions;
    
public java.lang.StringgetInfoString()
Information (documentation) for this TLD.

return
the info string for this tag lib

        return info;
    
public java.lang.StringgetPrefixString()
The prefix assigned to this taglib from the taglib directive

return
the prefix assigned to this taglib from the taglib directive

	return prefix;
    
public java.lang.StringgetReliableURN()
The "reliable" URN indicated in the TLD (the uri element). This may be used by authoring tools as a global identifier to use when creating a taglib directive for this library.

return
a reliable URN to a TLD like this

        return urn;
    
public java.lang.StringgetRequiredVersion()
A string describing the required version of the JSP container.

return
the (minimal) required version of the JSP container.
see
javax.servlet.jsp.JspEngineInfo

        return jspversion;
    
public java.lang.StringgetShortName()
The preferred short name (prefix) as indicated in the TLD. This may be used by authoring tools as the preferred prefix to use when creating an taglib directive for this library.

return
the preferred short name for the library

        return shortname;
    
public javax.servlet.jsp.tagext.TagInfogetTag(java.lang.String shortname)
Get the TagInfo for a given tag name, looking through all the tags in this tag library.

param
shortname The short name (no prefix) of the tag
return
the TagInfo for the tag with the specified short name, or null if no such tag is found

        TagInfo tags[] = getTags();

        if (tags == null || tags.length == 0) {
            return null;
        }

        for (int i=0; i < tags.length; i++) {
            if (tags[i].getTagName().equals(shortname)) {
                return tags[i];
            }
        }
        return null;
    
public javax.servlet.jsp.tagext.TagFileInfogetTagFile(java.lang.String shortname)
Get the TagFileInfo for a given tag name, looking through all the tag files in this tag library.

param
shortname The short name (no prefix) of the tag
return
the TagFileInfo for the specified Tag file, or null if no Tag file is found
since
JSP 2.0

        TagFileInfo tagFiles[] = getTagFiles();

        if (tagFiles == null || tagFiles.length == 0) {
            return null;
        }

        for (int i=0; i < tagFiles.length; i++) {
            if (tagFiles[i].getName().equals(shortname)) {
                return tagFiles[i];
            }
        }
        return null;
    
public javax.servlet.jsp.tagext.TagFileInfo[]getTagFiles()
An array describing the tag files that are defined in this tag library.

return
the TagFileInfo objects corresponding to the tag files defined by this tag library, or a zero length array if this tag library defines no tags files
since
JSP 2.0

        return tagFiles;
    
public abstract javax.servlet.jsp.tagext.TagLibraryInfo[]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.

return
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
JSP 2.1

public javax.servlet.jsp.tagext.TagInfo[]getTags()
An array describing the tags that are defined in this tag library.

return
the TagInfo objects corresponding to the tags defined by this tag library, or a zero length array if this tag library defines no tags

        return tags;
    
public java.lang.StringgetURI()
The value of the uri attribute from the taglib directive for this library.

return
the value of the uri attribute

        return uri;