< prev index next >

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

Print this page
@@ -1,7 +1,7 @@
  /*
-  * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved.
+  * Copyright (c) 2005, 2026, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.  Oracle designates this

@@ -23,10 +23,11 @@
   * questions.
   */
  
  package javax.lang.model.element;
  
+ import jdk.internal.javac.PreviewFeature;
  
  /**
   * Represents a modifier on a program element such
   * as a class, method, or field.
   *

@@ -118,10 +119,11 @@
      NON_SEALED {
          public String toString() {
              return "non-sealed";
          }
      },
+ 
      /**
       * The modifier {@code final}
       *
       * @jls 8.1.1.2 {@code sealed}, {@code non-sealed}, and {@code final} Classes
       * @jls 8.3.1.2 {@code final} Fields

@@ -162,11 +164,20 @@
       *
       * @jls 8.1.1.3 {@code strictfp} Classes
       * @jls 8.4.3.5 {@code strictfp} Methods
       * @jls 9.1.1.2 {@code strictfp} Interfaces
       */
-     STRICTFP;
+     STRICTFP,
+ 
+     /**
+      * The modifier {@code value}
+      *
+      * @jls value-objects-8.1.1.5 {@code value} Classes
+      * @since Valhalla
+      */
+     @PreviewFeature(feature=PreviewFeature.Feature.LANGUAGE_MODEL, reflective=true)
+     VALUE;
  
      /**
       * Returns this modifier's name as defined in <cite>The
       * Java Language Specification</cite>.
       * The modifier name is the {@linkplain #name() name of the enum
< prev index next >