Hello
I'm trying to write an extension of the standard doclet together with
custom taglets in the same JAR file. The custom taglets and doclet need
to share information. But I faced the following difficulties:
When the Taglet.init(DocletEnvironment,Doclet) method is invoked, the
doclet argument
On 4/18/18 9:08 AM, Martin Desruisseaux wrote:
Hello
I'm trying to write an extension of the standard doclet together with
custom taglets in the same JAR file. The custom taglets and doclet
need to share information. But I faced the following difficulties:
When the Taglet.init(DocletEnvi
Hello Jonathan
Thanks for your reply. Indeed, I understand that adding new API can be
tricky. If it is desired to avoid that path, modifying the
Taglet.init(…) specification the way you rephrased would help a lot.
Alternatively, another way to work without any specification change may
be to allow
Yes, it is on my list to dig into the details of why the
ClassCastException is being thrown.
-- Jon
On 4/18/18 9:53 AM, Martin Desruisseaux wrote:
Hello Jonathan
Thanks for your reply. Indeed, I understand that adding new API can be
tricky. If it is desired to avoid that path, modifying the
OK, we can't easily accept arbitrary subtypes of DocletEnvironment,
without embarking on a bunch of changes to other public API.
This means the correct solution here is that Taglet.init should be
called with the "user doclet" (which we expect people to provide
subtypes of) and the system-provi
Tracked as JDK-8201817
https://bugs.openjdk.java.net/browse/JDK-8201817
-- Jon
On 4/18/18 11:39 AM, Jonathan Gibbons wrote:
OK, we can't easily accept arbitrary subtypes of DocletEnvironment,
without embarking on a bunch of changes to other public API.
This means the correct solution here is
This is fine, thanks for investigating. Would the following
implementation adjustment be also acceptable?
* If the Doclet and the Taglet are defined in the same JAR file, then
they share the same URLClassLoader.
I'm not 100% sure that this is the right thing to do. But it would be
helpful (
In the general case, they cannot share classloaders ...
1. If you're loading user-defined taglets into the system-defined
Standard Doclet, they probably should not be in the same class loader.
2. The user may use the -tagletpath option to specify a different
searchpath for taglets.
You did