src/jdk.compiler/share/classes/com/sun/tools/javac/code/Flags.java
changeset 58713 ad69fd32778e
parent 54514 b0651dcc8d98
child 59285 7799a51dbe30
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Flags.java	Mon Oct 21 15:11:44 2019 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Flags.java	Mon Oct 21 15:38:26 2019 +0200
@@ -286,7 +286,17 @@
     /**
      * Flag to indicate the given ModuleSymbol is an automatic module.
      */
-    public static final long AUTOMATIC_MODULE = 1L<<52;
+    public static final long AUTOMATIC_MODULE = 1L<<52; //ModuleSymbols only
+
+    /**
+     * Flag to indicate the given PackageSymbol contains any non-.java and non-.class resources.
+     */
+    public static final long HAS_RESOURCE = 1L<<52; //PackageSymbols only
+
+    /**
+     * Flag to indicate the given ParamSymbol has a user-friendly name filled.
+     */
+    public static final long NAME_FILLED = 1L<<52; //ParamSymbols only
 
     /**
      * Flag to indicate the given ModuleSymbol is a system module.
@@ -304,9 +314,9 @@
     public static final long DEPRECATED_REMOVAL = 1L<<55;
 
     /**
-     * Flag to indicate the given PackageSymbol contains any non-.java and non-.class resources.
+     * Flag to indicate the API element in question is for a preview API.
      */
-    public static final long HAS_RESOURCE = 1L<<56;
+    public static final long PREVIEW_API = 1L<<56; //any Symbol kind
 
     /**
      * Flag for synthesized default constructors of anonymous classes that have an enclosing expression.
@@ -320,9 +330,9 @@
     public static final long BODY_ONLY_FINALIZE = 1L<<17; //blocks only
 
     /**
-     * Flag to indicate the given ParamSymbol has a user-friendly name filled.
+     * Flag to indicate the API element in question is for a preview API.
      */
-    public static final long NAME_FILLED = 1L<<58; //ParamSymbols only
+    public static final long PREVIEW_ESSENTIAL_API = 1L<<58; //any Symbol kind
 
     /** Modifier masks.
      */
@@ -441,7 +451,9 @@
         HAS_RESOURCE(Flags.HAS_RESOURCE),
         POTENTIALLY_AMBIGUOUS(Flags.POTENTIALLY_AMBIGUOUS),
         ANONCONSTR_BASED(Flags.ANONCONSTR_BASED),
-        NAME_FILLED(Flags.NAME_FILLED);
+        NAME_FILLED(Flags.NAME_FILLED),
+        PREVIEW_API(Flags.PREVIEW_API),
+        PREVIEW_ESSENTIAL_API(Flags.PREVIEW_ESSENTIAL_API);
 
         Flag(long flag) {
             this.value = flag;