Class TaglibXml

java.lang.Object
org.apache.tomcat.util.descriptor.tld.TaglibXml

public class TaglibXml extends Object
Common representation of a Tag Library Descriptor (TLD) XML file.

This stores the raw result of parsing an TLD XML file, flattening different version of the descriptors to a common format. This is different to a TagLibraryInfo instance that would be passed to a tag validator in that it does not contain the uri and prefix values used by a JSP to reference this tag library.

  • Constructor Details

    • TaglibXml

      public TaglibXml()
      Constructs a new TaglibXml.
  • Method Details

    • getTlibVersion

      public String getTlibVersion()
      Returns the tag library version.
      Returns:
      the library version
    • setTlibVersion

      public void setTlibVersion(String tlibVersion)
      Sets the tag library version.
      Parameters:
      tlibVersion - the library version
    • getJspVersion

      public String getJspVersion()
      Returns the JSP version requirement.
      Returns:
      the JSP version
    • setJspVersion

      public void setJspVersion(String jspVersion)
      Sets the JSP version requirement.
      Parameters:
      jspVersion - the JSP version
    • getShortName

      public String getShortName()
      Returns the short name of the tag library.
      Returns:
      the short name
    • setShortName

      public void setShortName(String shortName)
      Sets the short name of the tag library.
      Parameters:
      shortName - the short name
    • getUri

      public String getUri()
      Returns the URI of the tag library.
      Returns:
      the URI
    • setUri

      public void setUri(String uri)
      Sets the URI of the tag library.
      Parameters:
      uri - the URI
    • getInfo

      public String getInfo()
      Returns the description information.
      Returns:
      the info
    • setInfo

      public void setInfo(String info)
      Sets the description information.
      Parameters:
      info - the info
    • getValidator

      public ValidatorXml getValidator()
      Returns the validator configuration.
      Returns:
      the validator
    • setValidator

      public void setValidator(ValidatorXml validator)
      Sets the validator configuration.
      Parameters:
      validator - the validator
    • addTag

      public void addTag(TagXml tag)
      Adds a tag definition to this tag library.
      Parameters:
      tag - the tag to add
    • getTags

      public List<TagXml> getTags()
      Returns the list of tag definitions.
      Returns:
      the tags
    • addTagFile

      public void addTagFile(TagFileXml tag)
      Adds a tag file definition to this tag library.
      Parameters:
      tag - the tag file to add
    • getTagFiles

      public List<TagFileXml> getTagFiles()
      Returns the list of tag file definitions.
      Returns:
      the tag files
    • addListener

      public void addListener(String listener)
      Adds a listener class name to this tag library.
      Parameters:
      listener - the listener class name
    • getListeners

      public List<String> getListeners()
      Returns the list of listener class names.
      Returns:
      the listeners
    • addFunction

      public void addFunction(String name, String klass, String signature)
      Adds a function definition to this tag library.
      Parameters:
      name - the function name
      klass - the function class
      signature - the function signature
    • getFunctions

      public List<FunctionInfo> getFunctions()
      Returns the list of function definitions.
      Returns:
      the functions