Class LinkedClassNameTag

java.lang.Object
javax.servlet.jsp.tagext.TagSupport
com.semanticcms.tagreference.LinkedClassNameTag
All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag

public class LinkedClassNameTag extends TagSupport
Displays a class name, possibly linked to javadocs apis.

Supports arrays …[] and generics <…[, …]>, possibly nested.

See Also:
  • Constructor Details

    • LinkedClassNameTag

      public LinkedClassNameTag()
  • Method Details

    • setRequireLinks

      public void setRequireLinks(boolean requireLinks)
      Parameters:
      requireLinks - When true, will fail when a class does not map to a package in apiLinks. Defaults to false.
    • setApiLinks

      public void setApiLinks(Map<String,String> apiLinks)
      Parameters:
      apiLinks - The mapping of Java package name (with optional trailing '.') to javadoc prefixes (including trailing '/').
    • setClassName

      public void setClassName(String className)
      Parameters:
      className - The class name to display.
    • setShortName

      public void setShortName(boolean shortName)
      Parameters:
      shortName - When true, will display the class name in short format. Defaults to false.
    • writeLinkedClassName

      public static void writeLinkedClassName(PageContext pageContext, boolean requireLinks, Map<String,String> apiLinks, String className, boolean shortName, Appendable out) throws IOException, JspTagException
      Throws:
      IOException
      JspTagException
    • doStartTag

      public int doStartTag() throws JspException
      Specified by:
      doStartTag in interface Tag
      Overrides:
      doStartTag in class TagSupport
      Throws:
      JspException