java.lang.Object
javax.servlet.jsp.tagext.TagSupport
com.semanticcms.tagreference.LinkedClassNameTag
- All Implemented Interfaces:
Serializable
,IterationTag
,JspTag
,Tag
Displays a class name, possibly linked to javadocs apis.
Supports arrays …[]
and generics <…[, …]>
, possibly nested.
- See Also:
-
Field Summary
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
void
setApiLinks
(Map<String, String> apiLinks) void
setClassName
(String className) void
setRequireLinks
(boolean requireLinks) void
setShortName
(boolean shortName) static void
writeLinkedClassName
(PageContext pageContext, boolean requireLinks, Map<String, String> apiLinks, String className, boolean shortName, Appendable out) Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
-
Constructor Details
-
LinkedClassNameTag
public LinkedClassNameTag()
-
-
Method Details
-
setRequireLinks
public void setRequireLinks(boolean requireLinks) - Parameters:
requireLinks
- Whentrue
, will fail when a class does not map to a package in apiLinks. Defaults tofalse
.
-
setApiLinks
- Parameters:
apiLinks
- The mapping of Java package name (with optional trailing'.'
) to javadoc prefixes (including trailing'/'
).
-
setClassName
- Parameters:
className
- The class name to display.
-
setShortName
public void setShortName(boolean shortName) - Parameters:
shortName
- Whentrue
, will display the class name in short format. Defaults tofalse
.
-
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
- Specified by:
doStartTag
in interfaceTag
- Overrides:
doStartTag
in classTagSupport
- Throws:
JspException
-