R
Rhino
I'm still a little fuzzy on the best way to document it when I override an
inherited method.
At the moment, I have a JApplet that overrides the JApplet init() method and
have an @Override that is not within a Javadoc comment, like this:
/**
* This is my init method.
*/
@Override
public void init() {
// my code
}
The compiler has no trouble with this but Javadoc, invoked via Ant,
complains:
[javadoc] Loading source file E:\FooApplet.java...
[javadoc] E:\FooApplet.java:75: illegal character: \64
[javadoc] @Override
[javadoc] ^
If I omit the @Override tag that is outside of the Javadoc comment and use
an @Override tag that is within the Javadoc comment, my Javadoc error goes
away but I get a warning from the compiler that I should be using a
non-Javadoc @Override on my init() method.
If I have both @Override tags, one within the Javadoc comment and one
outside, Javadoc still complains about the one that is not within the
Javadoc comment.
I know that I can set the compiler to 'ignore' the overriding of methods
like init() but I don't want to do that in this case. How can I be sure not
to get a compiler warning but also get Javadoc to accept my @Override tags?
I'd be willing to tell Javadoc to ignore such things if there is a switch
for that but I haven't found one yet.
Can anyone enlighten me on the right way to handle this situation?
inherited method.
At the moment, I have a JApplet that overrides the JApplet init() method and
have an @Override that is not within a Javadoc comment, like this:
/**
* This is my init method.
*/
@Override
public void init() {
// my code
}
The compiler has no trouble with this but Javadoc, invoked via Ant,
complains:
[javadoc] Loading source file E:\FooApplet.java...
[javadoc] E:\FooApplet.java:75: illegal character: \64
[javadoc] @Override
[javadoc] ^
If I omit the @Override tag that is outside of the Javadoc comment and use
an @Override tag that is within the Javadoc comment, my Javadoc error goes
away but I get a warning from the compiler that I should be using a
non-Javadoc @Override on my init() method.
If I have both @Override tags, one within the Javadoc comment and one
outside, Javadoc still complains about the one that is not within the
Javadoc comment.
I know that I can set the compiler to 'ignore' the overriding of methods
like init() but I don't want to do that in this case. How can I be sure not
to get a compiler warning but also get Javadoc to accept my @Override tags?
I'd be willing to tell Javadoc to ignore such things if there is a switch
for that but I haven't found one yet.
Can anyone enlighten me on the right way to handle this situation?