#28 check order of modifiers

release_2.1
closed
None
5
2012-10-10
2002-02-06
Oliver Burn
No

The order of modifiers should be:

public protected private abstract static final
synchronized native

This is according to the appropriate sections (8.1.1,
8.3.1 and 8.4.3) of the JLS are at:

http://java.sun.com/docs/books/jls/second_edition/html/
classes.doc.html

Discussion

  • Lars Kühne

    Lars Kühne - 2002-02-12

    Logged In: YES
    user_id=401384

    Just to be precise - the order of modifiers as specified by
    the JLS is different for classes, members and methods:

    ClassModifier: public protected private abstract static final
    strictfp

    FieldModifier: public protected private static final transient
    volatile

    MethodModifier: public protected private abstract static
    final synchronized native strictfp

    ConstructorModifier: public protected private
    (well, no order to check here)

    The following list provides a total order that is consistent
    with all of the above:

    public protected private abstract static
    final transient volatile synchronized native strictfp

     
  • Lars Kühne

    Lars Kühne - 2002-02-15

    Logged In: YES
    user_id=401384

    This is now implemented in CVS

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks