Package ball.tools.javadoc
Class AbstractTaglet
- java.lang.Object
-
- ball.annotation.processing.JavaxLangModelUtilities
-
- ball.tools.javadoc.AbstractTaglet
-
- All Implemented Interfaces:
AnnotatedTaglet,JavadocHTMLTemplates,HTMLTemplates,XalanConstants,XMLConstants,XMLServices,Taglet
- Direct Known Subclasses:
AbstractInlineTaglet
public abstract class AbstractTaglet extends JavaxLangModelUtilities implements AnnotatedTaglet, JavadocHTMLTemplates, XalanConstants
AbstractTagletbase class. SeetoNode(List,Element).Note:
AnnotatedTaglet.getName()implementation requires the subclass is annotated withTagletName.- Author:
- Allen D. Ball
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jdk.javadoc.doclet.Taglet
Taglet.Location
-
-
Field Summary
Fields Modifier and Type Field Description protected DocTreestrees-
Fields inherited from class ball.annotation.processing.JavaxLangModelUtilities
elements, fm, types
-
Fields inherited from interface ball.xml.XalanConstants
XALAN_INDENT_AMOUNT
-
Fields inherited from interface ball.xml.XMLConstants
NO, YES
-
-
Constructor Summary
Constructors Constructor Description AbstractTaglet()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description FluentNodea(DocTree tag, Element element, Class<?> target, Node node)FluentNodea(DocTree tag, Element element, Member member, Node node)FluentNodea(DocTree tag, Element element, String name, Node node)FluentNodea(DocTree tag, Element element, TypeElement target, Node node)FluentDocumentdocument()protected BeanInfogetBeanInfo(Class<?> start)protected BeanInfogetBeanInfo(Class<?> start, Class<?> stop)protected ClassLoadergetClassLoader()protected StringgetResourcePathOf(Class<?> type)Method to get aClass's resource path.protected URLgetResourceURLOf(Class<?> type)protected StringgetText(DocTree tag)Method to get the text (String) associated with a tag ({link DocTree}).URIhref(DocTree tag, Element context, Object target)voidinit(DocletEnvironment env, Doclet doclet)protected voidprint(Diagnostic.Kind kind, DocTree tag, DocCommentTree comment, CompilationUnitTree unit, String format, Object... argv)Method to print a diagnostic message.protected voidprint(Diagnostic.Kind kind, DocTree tag, Element element, String format, Object... argv)Method to print a diagnostic message.protected Stringrender(Node node)protected Stringrender(Node node, int indent)protected abstract NodetoNode(List<? extends DocTree> tags, Element context)Abstract method to be overridden by subclass implementations.StringtoString(List<? extends DocTree> tags, Element element)-
Methods inherited from class ball.annotation.processing.JavaxLangModelUtilities
asClass, asExecutableElement, asExecutableElement, asPackageInfoClass, asTypeElement, asTypeMirror, asTypeMirrorList, asVariableElement, getAnnotationMirror, getAnnotationMirror, getAnnotationValue, getClassPathClassLoader, getClassPathClassLoader, getConstructor, getEnclosingTypeElement, getMethod, getPropertyName, getPropertyNames, getTypeElementFor, hasSameSignatureAs, hasSameSignatureAs, hasSameSignatureAs, implementationOf, isAssignableTo, isAssignableTo, isAssignableTo, isAssignableTo, isEmptyArray, isGenerated, isGetterMethod, named, overrides, overrides, signature, signature, specifiedBy, toEnumSet, toModifiers, toString, with, withModifiers, withModifiers, without, withoutModifiers, withoutModifiers, withParameters, withParameters
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ball.tools.javadoc.AnnotatedTaglet
getAllowedLocations, getName
-
Methods inherited from interface ball.xml.HTMLTemplates
a, a, a, b, b, caption, code, code, div, div, h1, h1, h1, h2, h2, h2, h3, h3, h3, h4, h4, h4, h5, h5, h5, h6, h6, h6, li, li, li, ol, ol, p, p, p, pre, pre, table, table, tbody, tbody, td, td, tfoot, tfoot, th, th, thead, thead, tr, tr, u, u, ul, ul
-
Methods inherited from interface ball.tools.javadoc.JavadocHTMLTemplates
a, a, a, a, a, a, annotation, declaration, declaration, declaration, declaration, declaration, modifiers, modifiers, table, table, toHTML, type, type, type, type
-
Methods inherited from interface jdk.javadoc.doclet.Taglet
isInlineTag
-
-
-
-
Constructor Detail
-
AbstractTaglet
public AbstractTaglet()
-
-
Method Detail
-
document
public FluentDocument document()
- Specified by:
documentin interfaceXMLServices
-
init
public void init(DocletEnvironment env, Doclet doclet)
-
toNode
protected abstract Node toNode(List<? extends DocTree> tags, Element context) throws Throwable
Abstract method to be overridden by subclass implementations.
-
render
protected String render(Node node)
- Parameters:
node- TheNode.- Returns:
- The
Stringrepresentation. - Throws:
RuntimeException- Instead of checkedException.
-
render
protected String render(Node node, int indent)
- Parameters:
node- TheNode.indent- The amount to indent;<= 0for no indentation.- Returns:
- The
Stringrepresentation. - Throws:
RuntimeException- Instead of checkedException.
-
print
protected void print(Diagnostic.Kind kind, DocTree tag, Element element, String format, Object... argv)
Method to print a diagnostic message.- Parameters:
kind- TheDiagnostic.Kind.tag- The offendingDocTree.element- The offendingElement.format- The message formatString.argv- Optional arguments to the message formatString.- See Also:
DocTrees.printMessage(Diagnostic.Kind,CharSequence,DocTree,DocCommentTree,CompilationUnitTree)
-
print
protected void print(Diagnostic.Kind kind, DocTree tag, DocCommentTree comment, CompilationUnitTree unit, String format, Object... argv)
Method to print a diagnostic message.- Parameters:
kind- TheDiagnostic.Kind.tag- The offendingDocTree.comment- The offendingDocCommentTree.unit- The offendingCompilationUnitTree.format- The message formatString.argv- Optional arguments to the message formatString.- See Also:
DocTrees.printMessage(Diagnostic.Kind,CharSequence,DocTree,DocCommentTree,CompilationUnitTree)
-
getResourcePathOf
protected String getResourcePathOf(Class<?> type)
Method to get aClass's resource path.
-
getResourceURLOf
protected URL getResourceURLOf(Class<?> type)
-
getBeanInfo
protected BeanInfo getBeanInfo(Class<?> start, Class<?> stop)
- Parameters:
start- The startClass.stop- The stopClass.- Returns:
BeanInfo- Throws:
RuntimeException- Instead of checkedException.
-
getBeanInfo
protected BeanInfo getBeanInfo(Class<?> start)
- Parameters:
start- The startClass.- Returns:
BeanInfo- Throws:
RuntimeException- Instead of checkedException.
-
getClassLoader
protected ClassLoader getClassLoader()
- Overrides:
getClassLoaderin classJavaxLangModelUtilities
-
href
public URI href(DocTree tag, Element context, Object target)
Description copied from interface:JavadocHTMLTemplates
-
a
public FluentNode a(DocTree tag, Element element, TypeElement target, Node node)
Description copied from interface:JavadocHTMLTemplates- Specified by:
ain interfaceJavadocHTMLTemplates- Parameters:
tag- The contextDocTree.element- The contextElement.target- The targetTypeElement.node- The childNode(may benull).- Returns:
Element
-
a
public FluentNode a(DocTree tag, Element element, Class<?> target, Node node)
Description copied from interface:JavadocHTMLTemplates
-
a
public FluentNode a(DocTree tag, Element element, Member member, Node node)
Description copied from interface:JavadocHTMLTemplates
-
a
public FluentNode a(DocTree tag, Element element, String name, Node node)
Description copied from interface:JavadocHTMLTemplates
-
-