-
Enhancement
-
Resolution: Won't Fix
-
P4
-
1.3.0
-
sparc
-
solaris_2.6
The method modifiers() returns the word "interface", much to
the surprise of several users. It comes as a total
surprise to anyone who uses the API.
This is either a doc bug to better document "modifiers()" or a Doclet API bug
to improve the interface.
The issue basically stems from the fact that there is
no InterfaceDoc type -- only a ClassDoc type. So
anything other than the word "class" in the signature
is considered a "modifier" -- even when the word is
"interface".
That is just plain wrong-headed. But any doclet code
ever written has accounted for that behavior, by now.
The only real solution, then, is to both:
a) Deprecate modifiers()
b) Replace it with something that does the right
thing, called declarations(), or something.
And, optionally:
a) Create an IfcDoc class.
b) Have both ClassDoc and IfcDoc extend a common
class, called PrototypeDoc
c) Create a TemplateDoc subclass of PrototypeDoc,
when parameterized types become a reality.
Then maybe I could *remember* that the thing the
code is processing could be either a class or an
interface. (Calling it a classdoc object leads me
to forgetting, over and over, that it might be an
interface. Calling it a PrototypeDoc would assist
my beleagured memory.)
the surprise of several users. It comes as a total
surprise to anyone who uses the API.
This is either a doc bug to better document "modifiers()" or a Doclet API bug
to improve the interface.
The issue basically stems from the fact that there is
no InterfaceDoc type -- only a ClassDoc type. So
anything other than the word "class" in the signature
is considered a "modifier" -- even when the word is
"interface".
That is just plain wrong-headed. But any doclet code
ever written has accounted for that behavior, by now.
The only real solution, then, is to both:
a) Deprecate modifiers()
b) Replace it with something that does the right
thing, called declarations(), or something.
And, optionally:
a) Create an IfcDoc class.
b) Have both ClassDoc and IfcDoc extend a common
class, called PrototypeDoc
c) Create a TemplateDoc subclass of PrototypeDoc,
when parameterized types become a reality.
Then maybe I could *remember* that the thing the
code is processing could be either a class or an
interface. (Calling it a classdoc object leads me
to forgetting, over and over, that it might be an
interface. Calling it a PrototypeDoc would assist
my beleagured memory.)