Hello,
Currently the classpath files use redundant modifiers for interfaces,
e.g.
public abstract interface xxx
Each interface is implicitly abstract. The java language
specification (Version 1.0) even says (9.1.2.1):
Every interface is implicitly abstract. This modifier is obsolete
and should not be used in new Java programs.
Similar holds for abstract methods (9.4) and public static final
fields (9.3) in an interface:
Every field declaration in the body of an interface is implicitly
public, static, and final. It is permitted, but strongly discouraged
as a matter of style, to redundantly specify any or all of these
modifiers for such fields.
[...] For compatibility with older versions of Java, it is permitted
but discouraged, as a matter of style, to redundantly specify the
abstract modifier for methods declared in interfaces.
Every method declaration in the body of an interface is implicitly
public. It is permitted, but strongly discouraged as a matter of
style, to redundantly specify the public modifier for interface
methods.
Since jikes even warns about the abstract modifier of an interface, I
would like to remove at least these. So which modifiers do you think
(if any at all) should be removed?
Should the abstract modifier of the interfaces should be removed?
(I think so, jikes complains about them.)
Should the abstract modifiers of interface _methods_ be removed?
(I would prefer this.)
Should the public modifiers of interface fields and methods in interfaces
be removed? (I think not, it is better to see that they are public)
Should the static and final modifiers of interface fields be removed?
(I don't think so.)
Jochen