< prev index next >

src/java.compiler/share/classes/javax/lang/model/element/Modifier.java

Print this page




  42  * @author Scott Seligman
  43  * @author Peter von der Ah&eacute;
  44  * @since 1.6
  45  */
  46 
  47 public enum Modifier {
  48 
  49     // See JLS sections 8.1.1, 8.3.1, 8.4.3, 8.8.3, and 9.1.1.
  50     // java.lang.reflect.Modifier includes INTERFACE, but that's a VMism.
  51 
  52     /** The modifier {@code public} */          PUBLIC,
  53     /** The modifier {@code protected} */       PROTECTED,
  54     /** The modifier {@code private} */         PRIVATE,
  55     /** The modifier {@code abstract} */        ABSTRACT,
  56     /**
  57      * The modifier {@code default}
  58      * @since 1.8
  59      */
  60      DEFAULT,
  61     /** The modifier {@code static} */          STATIC,





  62     /** The modifier {@code final} */           FINAL,
  63     /** The modifier {@code transient} */       TRANSIENT,
  64     /** The modifier {@code volatile} */        VOLATILE,
  65     /** The modifier {@code synchronized} */    SYNCHRONIZED,
  66     /** The modifier {@code native} */          NATIVE,
  67     /** The modifier {@code strictfp} */        STRICTFP;
  68 
  69     /**
  70      * Returns this modifier's name in lowercase.
  71      */
  72     public String toString() {
  73         return name().toLowerCase(java.util.Locale.US);
  74     }
  75 }


  42  * @author Scott Seligman
  43  * @author Peter von der Ah&eacute;
  44  * @since 1.6
  45  */
  46 
  47 public enum Modifier {
  48 
  49     // See JLS sections 8.1.1, 8.3.1, 8.4.3, 8.8.3, and 9.1.1.
  50     // java.lang.reflect.Modifier includes INTERFACE, but that's a VMism.
  51 
  52     /** The modifier {@code public} */          PUBLIC,
  53     /** The modifier {@code protected} */       PROTECTED,
  54     /** The modifier {@code private} */         PRIVATE,
  55     /** The modifier {@code abstract} */        ABSTRACT,
  56     /**
  57      * The modifier {@code default}
  58      * @since 1.8
  59      */
  60      DEFAULT,
  61     /** The modifier {@code static} */          STATIC,
  62     /**
  63      * The modifier {@code sealed}
  64      * @since amber
  65      */
  66     SEALED, // Not sure this the best order; certainly after public/private.
  67     /** The modifier {@code final} */           FINAL,
  68     /** The modifier {@code transient} */       TRANSIENT,
  69     /** The modifier {@code volatile} */        VOLATILE,
  70     /** The modifier {@code synchronized} */    SYNCHRONIZED,
  71     /** The modifier {@code native} */          NATIVE,
  72     /** The modifier {@code strictfp} */        STRICTFP;
  73 
  74     /**
  75      * Returns this modifier's name in lowercase.
  76      */
  77     public String toString() {
  78         return name().toLowerCase(java.util.Locale.US);
  79     }
  80 }
< prev index next >