public class JDoctest extends Object implements com.sun.tools.doclets.Taglet
Doc. It is not an
inline tag. A "@doc.test" tag specifies an interactive javascript
session, in an environment where the class' package has been imported.
The output of the javascript session should match the output
provided.js> "a".equals("a") true
js> 1+2 5
doctest failure running: 1+2 expected: 5 actual: 3 (JDoctest.java#82)
js> try { > java.lang.String("hi").charAt(3); > } catch (e) { > print(e.javaException.getMessage()) > } String index out of range: 3
js> JDoctest [JavaClass net.cscott.jdoctest.JDoctest] js> Version.PACKAGE_NAME jdoctest
js> o = new java.lang.Object() java.lang.Object@1d2068d js> o java.lang.Object@1d2068d js> new java.lang.Object() java.lang.Object@1ac2f9c
| Constructor and Description |
|---|
JDoctest() |
| Modifier and Type | Method and Description |
|---|---|
String |
getName()
Return the name of this custom tag.
|
boolean |
inConstructor()
Will return true since
@doc.test
can be used in constructor documentation. |
boolean |
inField()
Will return true since
@doc.test
can be used in field documentation. |
boolean |
inMethod()
Will return true since
@doc.test
can be used in method documentation. |
boolean |
inOverview()
Will return true since
@doc.test
can be used in method documentation. |
boolean |
inPackage()
Will return true since
@doc.test
can be used in package documentation. |
boolean |
inType()
Will return true since
@doc.test
can be used in type documentation (classes or interfaces). |
boolean |
isInlineTag()
Will return false since
@doc.test
is not an inline tag. |
static void |
register(Map tagletMap)
Register this Taglet.
|
String |
toString(Tag tag)
Given the
Tag representation of this custom
tag, return its string representation. |
String |
toString(Tag[] tags)
Given an array of
Tags representing this custom
tag, return its string representation. |
public String getName()
getName in interface com.sun.tools.doclets.Tagletjs> new JDoctest().getName() doc.test
public boolean inField()
@doc.test
can be used in field documentation.inField in interface com.sun.tools.doclets.Tagletpublic boolean inConstructor()
@doc.test
can be used in constructor documentation.inConstructor in interface com.sun.tools.doclets.Tagletpublic boolean inMethod()
@doc.test
can be used in method documentation.inMethod in interface com.sun.tools.doclets.Tagletpublic boolean inOverview()
@doc.test
can be used in method documentation.inOverview in interface com.sun.tools.doclets.Tagletpublic boolean inPackage()
@doc.test
can be used in package documentation.inPackage in interface com.sun.tools.doclets.Tagletpublic boolean inType()
@doc.test
can be used in type documentation (classes or interfaces).inType in interface com.sun.tools.doclets.Tagletpublic boolean isInlineTag()
@doc.test
is not an inline tag.isInlineTag in interface com.sun.tools.doclets.Tagletpublic static void register(Map tagletMap)
tagletMap - the map to register this tag to.js> m = java.util.HashMap() {} js> JDoctest.register(m) js> m.get("doc.test") net.cscott.jdoctest.JDoctest@de1b8a
public String toString(Tag tag)
Tag representation of this custom
tag, return its string representation.toString in interface com.sun.tools.doclets.Taglettag - the Tag representation of this custom tag.Copyright © 2009 C. Scott Ananian