|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.h2b.taglets.Registration
@ClassLabel(copyright="Copyright (C) 2008 Hans-Hermann Bode", ident="$Id: Registration.java,v 1.5 2008/12/14 17:05:37 h2b Exp $") public final class Registration
A singleton that provides a static register
method as a single
entry point for the javadoc tool.
In this way, all taglets of this project will be registered to the map of
custom tags at once.
Note that this single entry point is not only made available for
convenience but is also required for taglets like CiteTaglet
and BiblioTaglet
which have cross-reference dependencies on each
other and
thus are reliant on shared objects. Apparently, with the current
javadoc-tool implementation even singletons are not shared at least
by inline and block taglets when registered separately.
During registration, also the CrossRefMap
is loaded from a file
and measure is taken to save the map at shutdown. For this reason,
this class implements Runnable
.
CrossRefMap
Field Summary | |
---|---|
protected static CrossRefMap |
XREF_MAP
The map that stores the cross-ref tables. |
protected static java.io.File |
XREF_MAP_FILE
The file that stores the cross-ref map. |
Method Summary | |
---|---|
static void |
register(java.util.Map tagletMap)
Registers all taglets of this project. |
protected static void |
register(java.util.Map tagletMap,
com.sun.tools.doclets.Taglet taglet)
Registers a taglet. |
void |
run()
Serves as entry point for Runnable interface. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final CrossRefMap XREF_MAP
protected static final java.io.File XREF_MAP_FILE
Method Detail |
---|
public static void register(java.util.Map tagletMap)
tagletMap
- the map to register the taglets toprotected static void register(java.util.Map tagletMap, com.sun.tools.doclets.Taglet taglet)
Implementation note: In the current version of the javadoc
tool the map of custom tags consists of key-value pairs with values
of an internal type
com.sun.tools.doclets.internal.toolkit.taglets.Taglet
.
Therefore, taglets of type com.sun.tools.doclets.Taglet
, which
are used in this project, have to be converted to the internal
interface. The TagletManager
of the internal toolkit will do
this automatically only
for the last entry added to the map at a single registration, so we
have to do the conversion
explicitly here. This can be done by creating a LegacyTaglet
;
beware that the documentation of this class notes:
This code is not part of an API.
It is implementation that is subject to change.
Do not use it as an API.
tagletMap
- the map to register the taglet totaglet
- the taglet to be registeredLegacyTaglet
,
LegacyTaglet.LegacyTaglet(Taglet)
,
TagletManager.addCustomTag(String, String)
,
TagletManager.checkTaglet(java.lang.Object)
public void run()
Runnable
interface.
run
in interface java.lang.Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |