< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/code/Flags.java

Print this page

 88 
 89     /* Flag that marks a symbol synthetic, added in classfile v49.0. */
 90     public static final int SYNTHETIC    = 1<<12;
 91 
 92     /** Flag that marks attribute interfaces, added in classfile v49.0. */
 93     public static final int ANNOTATION   = 1<<13;
 94 
 95     /** An enumeration type or an enumeration constant, added in
 96      *  classfile v49.0. */
 97     public static final int ENUM         = 1<<14;
 98 
 99     /** Added in SE8, represents constructs implicitly declared in source. */
100     public static final int MANDATED     = 1<<15;
101 
102     public static final int StandardFlags = 0x0fff;
103 
104     // Because the following access flags are overloaded with other
105     // bit positions, we translate them when reading and writing class
106     // files into unique bits positions: ACC_SYNTHETIC <-> SYNTHETIC,
107     // for example.
108     public static final int ACC_SUPER    = 0x0020;
109     public static final int ACC_BRIDGE   = 0x0040;
110     public static final int ACC_VARARGS  = 0x0080;

111     public static final int ACC_MODULE   = 0x8000;
112 
113     /* ***************************************
114      * Internal compiler flags (no bits in the lower 16).
115      *****************************************/
116 
117     /** Flag is set if symbol is deprecated.  See also DEPRECATED_REMOVAL.
118      */
119     public static final int DEPRECATED   = 1<<17;
120 
121     /** Flag is set for a variable symbol if the variable's definition
122      *  has an initializer part.
123      */
124     public static final int HASINIT          = 1<<18;
125 







126     /** Class is an implicitly declared top level class.
127      */
128     public static final int IMPLICIT_CLASS    = 1<<19;
129 
130     /** Flag is set for compiler-generated anonymous method symbols
131      *  that `own' an initializer block.
132      */
133     public static final int BLOCK            = 1<<20;
134 



135     /** Flag is set for ClassSymbols that are being compiled from source.
136      */
137     public static final int FROM_SOURCE      = 1<<21; //ClassSymbols
138 
139     /** Flag is set for nested classes that do not access instance members
140      *  or `this' of an outer class and therefore don't need to be passed
141      *  a this$n reference.  This value is currently set only for anonymous
142      *  classes in superclass constructor calls.
143      *  todo: use this value for optimizing away this$n parameters in
144      *  other cases.
145      */
146     public static final int NOOUTERTHIS  = 1<<22;
147 
148     /** Flag is set for package symbols if a package has a member or
149      *  directory and therefore exists.
150      */
151     public static final int EXISTS           = 1<<23;
152 
153     /** Flag is set for compiler-generated compound classes
154      *  representing multiple variable bounds

310     /**
311      * Flag to indicate the given PackageSymbol contains any non-.java and non-.class resources.
312      */
313     public static final long HAS_RESOURCE = 1L<<52; //PackageSymbols only
314 
315     /**
316      * Flag to indicate the given ParamSymbol has a user-friendly name filled.
317      */
318     public static final long NAME_FILLED = 1L<<52; //ParamSymbols only
319 
320     /**
321      * Flag to indicate the given ModuleSymbol is a system module.
322      */
323     public static final long SYSTEM_MODULE = 1L<<53; //ModuleSymbols only
324 
325     /**
326      * Flag to indicate the given ClassSymbol is a value based.
327      */
328     public static final long VALUE_BASED = 1L<<53; //ClassSymbols only
329 





330     /**
331      * Flag to indicate the given symbol has a @Deprecated annotation.
332      */
333     public static final long DEPRECATED_ANNOTATION = 1L<<54;
334 
335     /**
336      * Flag to indicate the given symbol has been deprecated and marked for removal.
337      */
338     public static final long DEPRECATED_REMOVAL = 1L<<55;
339 
340     /**
341      * Flag to indicate the API element in question is for a preview API.
342      */
343     public static final long PREVIEW_API = 1L<<56; //any Symbol kind
344 
345     /**
346      * Flag for synthesized default constructors of anonymous classes that have an enclosing expression.
347      */
348     public static final long ANONCONSTR_BASED = 1L<<57;
349 

387     /** Flag is set for compiler-generated record members, it could be applied to
388      *  accessors and fields
389      */
390     public static final int GENERATED_MEMBER = 1<<24; // MethodSymbols and VarSymbols
391 
392     /**
393      * Flag to indicate sealed class/interface declaration.
394      */
395     public static final long SEALED = 1L<<62; // ClassSymbols
396 
397     /**
398      * Flag to indicate restricted method declaration.
399      */
400     public static final long RESTRICTED = 1L<<62; // MethodSymbols
401 
402     /**
403      * Flag to indicate that the class/interface was declared with the non-sealed modifier.
404      */
405     public static final long NON_SEALED = 1L<<63; // ClassSymbols
406 





407     /**
408      * Describe modifier flags as they might appear in source code, i.e.,
409      * separated by spaces and in the order suggested by JLS 8.1.1.
410      */
411     public static String toSource(long flags) {
412         return asModifierSet(flags).stream()
413           .map(Modifier::toString)
414           .collect(Collectors.joining(" "));
415     }
416 
417     /** Modifier masks.
418      */
419     public static final int
420         AccessFlags                       = PUBLIC | PROTECTED | PRIVATE,
421         LocalClassFlags                   = FINAL | ABSTRACT | STRICTFP | ENUM | SYNTHETIC,
422         StaticLocalFlags                  = LocalClassFlags | STATIC | INTERFACE,
423         MemberClassFlags                  = LocalClassFlags | INTERFACE | AccessFlags,
424         MemberStaticClassFlags            = MemberClassFlags | STATIC,
425         ClassFlags                        = LocalClassFlags | INTERFACE | PUBLIC | ANNOTATION,
426         InterfaceVarFlags                 = FINAL | STATIC | PUBLIC,
427         VarFlags                          = AccessFlags | FINAL | STATIC |
428                                             VOLATILE | TRANSIENT | ENUM,
429         ConstructorFlags                  = AccessFlags,
430         InterfaceMethodFlags              = ABSTRACT | PUBLIC,
431         MethodFlags                       = AccessFlags | ABSTRACT | STATIC | NATIVE |
432                                             SYNCHRONIZED | FINAL | STRICTFP,
433         RecordMethodFlags                 = AccessFlags | ABSTRACT | STATIC |
434                                             SYNCHRONIZED | FINAL | STRICTFP;
435     public static final long
436         ExtendedStandardFlags             = (long)StandardFlags | DEFAULT | SEALED | NON_SEALED,
437         ExtendedMemberClassFlags          = (long)MemberClassFlags | SEALED | NON_SEALED,
438         ExtendedMemberStaticClassFlags    = (long) MemberStaticClassFlags | SEALED | NON_SEALED,
439         ExtendedClassFlags                = (long)ClassFlags | SEALED | NON_SEALED,
440         ModifierFlags                     = ((long)StandardFlags & ~INTERFACE) | DEFAULT | SEALED | NON_SEALED,



441         InterfaceMethodMask               = ABSTRACT | PRIVATE | STATIC | PUBLIC | STRICTFP | DEFAULT,
442         AnnotationTypeElementMask         = ABSTRACT | PUBLIC,
443         LocalVarFlags                     = FINAL | PARAMETER,
444         ReceiverParamFlags                = PARAMETER;
445 
446     public static Set<Modifier> asModifierSet(long flags) {
447         Set<Modifier> modifiers = modifierSets.get(flags);
448         if (modifiers == null) {
449             modifiers = java.util.EnumSet.noneOf(Modifier.class);
450             if (0 != (flags & PUBLIC))    modifiers.add(Modifier.PUBLIC);
451             if (0 != (flags & PROTECTED)) modifiers.add(Modifier.PROTECTED);
452             if (0 != (flags & PRIVATE))   modifiers.add(Modifier.PRIVATE);
453             if (0 != (flags & ABSTRACT))  modifiers.add(Modifier.ABSTRACT);
454             if (0 != (flags & STATIC))    modifiers.add(Modifier.STATIC);
455             if (0 != (flags & SEALED))    modifiers.add(Modifier.SEALED);
456             if (0 != (flags & NON_SEALED))
457                                           modifiers.add(Modifier.NON_SEALED);
458             if (0 != (flags & FINAL))     modifiers.add(Modifier.FINAL);
459             if (0 != (flags & TRANSIENT)) modifiers.add(Modifier.TRANSIENT);
460             if (0 != (flags & VOLATILE))  modifiers.add(Modifier.VOLATILE);
461             if (0 != (flags & SYNCHRONIZED))
462                                           modifiers.add(Modifier.SYNCHRONIZED);
463             if (0 != (flags & NATIVE))    modifiers.add(Modifier.NATIVE);
464             if (0 != (flags & STRICTFP))  modifiers.add(Modifier.STRICTFP);
465             if (0 != (flags & DEFAULT))   modifiers.add(Modifier.DEFAULT);

466             modifiers = Collections.unmodifiableSet(modifiers);
467             modifierSets.put(flags, modifiers);
468         }
469         return modifiers;
470     }
471 
472     // Cache of modifier sets.
473     private static final Map<Long, Set<Modifier>> modifierSets = new ConcurrentHashMap<>(64);
474 
475     public static boolean isStatic(Symbol symbol) {
476         return (symbol.flags() & STATIC) != 0;
477     }
478 
479     public static boolean isEnum(Symbol symbol) {
480         return (symbol.flags() & ENUM) != 0;
481     }
482 
483     public static boolean isConstant(Symbol.VarSymbol symbol) {
484         return symbol.getConstValue() != null;
485     }
486 
487 
488     public enum Flag {
489         PUBLIC(Flags.PUBLIC),
490         PRIVATE(Flags.PRIVATE),
491         PROTECTED(Flags.PROTECTED),
492         STATIC(Flags.STATIC),
493         FINAL(Flags.FINAL),
494         SYNCHRONIZED(Flags.SYNCHRONIZED),
495         VOLATILE(Flags.VOLATILE),
496         TRANSIENT(Flags.TRANSIENT),
497         NATIVE(Flags.NATIVE),
498         INTERFACE(Flags.INTERFACE),
499         ABSTRACT(Flags.ABSTRACT),
500         DEFAULT(Flags.DEFAULT),
501         STRICTFP(Flags.STRICTFP),
502         BRIDGE(Flags.BRIDGE),
503         SYNTHETIC(Flags.SYNTHETIC),
504         ANNOTATION(Flags.ANNOTATION),
505         DEPRECATED(Flags.DEPRECATED),
506         HASINIT(Flags.HASINIT),







507         IMPLICIT_CLASS(Flags.IMPLICIT_CLASS),
508         BLOCK(Flags.BLOCK),
509         FROM_SOURCE(Flags.FROM_SOURCE),
510         ENUM(Flags.ENUM),
511         MANDATED(Flags.MANDATED),
512         NOOUTERTHIS(Flags.NOOUTERTHIS),
513         EXISTS(Flags.EXISTS),
514         COMPOUND(Flags.COMPOUND),
515         CLASS_SEEN(Flags.CLASS_SEEN),
516         SOURCE_SEEN(Flags.SOURCE_SEEN),
517         LOCKED(Flags.LOCKED),
518         UNATTRIBUTED(Flags.UNATTRIBUTED),
519         ANONCONSTR(Flags.ANONCONSTR),
520         ACYCLIC(Flags.ACYCLIC),
521         PARAMETER(Flags.PARAMETER),
522         VARARGS(Flags.VARARGS),
523         ACYCLIC_ANN(Flags.ACYCLIC_ANN),
524         GENERATEDCONSTR(Flags.GENERATEDCONSTR),
525         HYPOTHETICAL(Flags.HYPOTHETICAL),
526         PROPRIETARY(Flags.PROPRIETARY),

538         AUTOMATIC_MODULE(Flags.AUTOMATIC_MODULE),
539         SYSTEM_MODULE(Flags.SYSTEM_MODULE),
540         DEPRECATED_ANNOTATION(Flags.DEPRECATED_ANNOTATION),
541         DEPRECATED_REMOVAL(Flags.DEPRECATED_REMOVAL),
542         HAS_RESOURCE(Flags.HAS_RESOURCE),
543         // Bit 48 is currently available
544         ANONCONSTR_BASED(Flags.ANONCONSTR_BASED),
545         NAME_FILLED(Flags.NAME_FILLED),
546         PREVIEW_API(Flags.PREVIEW_API),
547         PREVIEW_REFLECTIVE(Flags.PREVIEW_REFLECTIVE),
548         MATCH_BINDING(Flags.MATCH_BINDING),
549         MATCH_BINDING_TO_OUTER(Flags.MATCH_BINDING_TO_OUTER),
550         RECORD(Flags.RECORD),
551         RECOVERABLE(Flags.RECOVERABLE),
552         SEALED(Flags.SEALED),
553         NON_SEALED(Flags.NON_SEALED) {
554             @Override
555             public String toString() {
556                 return "non-sealed";
557             }
558         };

559 
560         Flag(long flag) {
561             this.value = flag;
562             this.lowercaseName = StringUtils.toLowerCase(name());
563         }
564 
565         @Override
566         public String toString() {
567             return lowercaseName;
568         }
569 
570         final long value;
571         final String lowercaseName;
572     }
573 
574 }

 88 
 89     /* Flag that marks a symbol synthetic, added in classfile v49.0. */
 90     public static final int SYNTHETIC    = 1<<12;
 91 
 92     /** Flag that marks attribute interfaces, added in classfile v49.0. */
 93     public static final int ANNOTATION   = 1<<13;
 94 
 95     /** An enumeration type or an enumeration constant, added in
 96      *  classfile v49.0. */
 97     public static final int ENUM         = 1<<14;
 98 
 99     /** Added in SE8, represents constructs implicitly declared in source. */
100     public static final int MANDATED     = 1<<15;
101 
102     public static final int StandardFlags = 0x0fff;
103 
104     // Because the following access flags are overloaded with other
105     // bit positions, we translate them when reading and writing class
106     // files into unique bits positions: ACC_SYNTHETIC <-> SYNTHETIC,
107     // for example.
108     public static final int ACC_IDENTITY = 0x0020;
109     public static final int ACC_BRIDGE   = 0x0040;
110     public static final int ACC_VARARGS  = 0x0080;
111     public static final int ACC_STRICT   = 0x0800;
112     public static final int ACC_MODULE   = 0x8000;
113 
114     /* ***************************************
115      * Internal compiler flags (no bits in the lower 16).
116      *****************************************/
117 
118     /** Flag is set if symbol is deprecated.  See also DEPRECATED_REMOVAL.
119      */
120     public static final int DEPRECATED   = 1<<17;
121 
122     /** Flag is set for a variable symbol if the variable's definition
123      *  has an initializer part.
124      */
125     public static final int HASINIT          = 1<<18;
126 
127     /** Flag is set for a class or interface whose instances have identity
128      * i.e. any concrete class not declared with the modifier `value'
129      * (a) abstract class not declared `value'
130      * (b) older class files with ACC_SUPER bit set
131      */
132     public static final int IDENTITY_TYPE            = 1<<19;
133 
134     /** Class is an implicitly declared top level class.
135      */
136     public static final int IMPLICIT_CLASS    = 1<<23;
137 
138     /** Flag is set for compiler-generated anonymous method symbols
139      *  that `own' an initializer block.
140      */
141     public static final int BLOCK            = 1<<20;
142 
143     /** Marks a type as a value class */
144     public static final int VALUE_CLASS      = 1<<20;
145 
146     /** Flag is set for ClassSymbols that are being compiled from source.
147      */
148     public static final int FROM_SOURCE      = 1<<21; //ClassSymbols
149 
150     /** Flag is set for nested classes that do not access instance members
151      *  or `this' of an outer class and therefore don't need to be passed
152      *  a this$n reference.  This value is currently set only for anonymous
153      *  classes in superclass constructor calls.
154      *  todo: use this value for optimizing away this$n parameters in
155      *  other cases.
156      */
157     public static final int NOOUTERTHIS  = 1<<22;
158 
159     /** Flag is set for package symbols if a package has a member or
160      *  directory and therefore exists.
161      */
162     public static final int EXISTS           = 1<<23;
163 
164     /** Flag is set for compiler-generated compound classes
165      *  representing multiple variable bounds

321     /**
322      * Flag to indicate the given PackageSymbol contains any non-.java and non-.class resources.
323      */
324     public static final long HAS_RESOURCE = 1L<<52; //PackageSymbols only
325 
326     /**
327      * Flag to indicate the given ParamSymbol has a user-friendly name filled.
328      */
329     public static final long NAME_FILLED = 1L<<52; //ParamSymbols only
330 
331     /**
332      * Flag to indicate the given ModuleSymbol is a system module.
333      */
334     public static final long SYSTEM_MODULE = 1L<<53; //ModuleSymbols only
335 
336     /**
337      * Flag to indicate the given ClassSymbol is a value based.
338      */
339     public static final long VALUE_BASED = 1L<<53; //ClassSymbols only
340 
341     /**
342      * Flag to indicate the given ClassSymbol is a value based.
343      */
344     public static final long MIGRATED_VALUE_CLASS = 1L<<57; //ClassSymbols only
345 
346     /**
347      * Flag to indicate the given symbol has a @Deprecated annotation.
348      */
349     public static final long DEPRECATED_ANNOTATION = 1L<<54;
350 
351     /**
352      * Flag to indicate the given symbol has been deprecated and marked for removal.
353      */
354     public static final long DEPRECATED_REMOVAL = 1L<<55;
355 
356     /**
357      * Flag to indicate the API element in question is for a preview API.
358      */
359     public static final long PREVIEW_API = 1L<<56; //any Symbol kind
360 
361     /**
362      * Flag for synthesized default constructors of anonymous classes that have an enclosing expression.
363      */
364     public static final long ANONCONSTR_BASED = 1L<<57;
365 

403     /** Flag is set for compiler-generated record members, it could be applied to
404      *  accessors and fields
405      */
406     public static final int GENERATED_MEMBER = 1<<24; // MethodSymbols and VarSymbols
407 
408     /**
409      * Flag to indicate sealed class/interface declaration.
410      */
411     public static final long SEALED = 1L<<62; // ClassSymbols
412 
413     /**
414      * Flag to indicate restricted method declaration.
415      */
416     public static final long RESTRICTED = 1L<<62; // MethodSymbols
417 
418     /**
419      * Flag to indicate that the class/interface was declared with the non-sealed modifier.
420      */
421     public static final long NON_SEALED = 1L<<63; // ClassSymbols
422 
423     /**
424      * Flag to indicate that a field is strict
425      */
426     public static final long STRICT = 1L<<53; // VarSymbols
427 
428     /**
429      * Describe modifier flags as they might appear in source code, i.e.,
430      * separated by spaces and in the order suggested by JLS 8.1.1.
431      */
432     public static String toSource(long flags) {
433         return asModifierSet(flags).stream()
434           .map(Modifier::toString)
435           .collect(Collectors.joining(" "));
436     }
437 
438     /** Modifier masks.
439      */
440     public static final int
441         AccessFlags                       = PUBLIC | PROTECTED | PRIVATE,
442         LocalClassFlags                   = FINAL | ABSTRACT | STRICTFP | ENUM | SYNTHETIC | IDENTITY_TYPE,
443         StaticLocalClassFlags             = LocalClassFlags | STATIC | INTERFACE,
444         MemberClassFlags                  = LocalClassFlags | INTERFACE | AccessFlags,
445         MemberStaticClassFlags            = MemberClassFlags | STATIC,
446         ClassFlags                        = LocalClassFlags | INTERFACE | PUBLIC | ANNOTATION,
447         InterfaceVarFlags                 = FINAL | STATIC | PUBLIC,
448         VarFlags                          = AccessFlags | FINAL | STATIC |
449                                             VOLATILE | TRANSIENT | ENUM,
450         ConstructorFlags                  = AccessFlags,
451         InterfaceMethodFlags              = ABSTRACT | PUBLIC,
452         MethodFlags                       = AccessFlags | ABSTRACT | STATIC | NATIVE |
453                                             SYNCHRONIZED | FINAL | STRICTFP,
454         RecordMethodFlags                 = AccessFlags | ABSTRACT | STATIC |
455                                             SYNCHRONIZED | FINAL | STRICTFP;
456     public static final long
457         ExtendedStandardFlags             = (long)StandardFlags | DEFAULT | SEALED | NON_SEALED | VALUE_CLASS,
458         ExtendedMemberClassFlags          = (long)MemberClassFlags | SEALED | NON_SEALED | VALUE_CLASS,
459         ExtendedMemberStaticClassFlags    = (long) MemberStaticClassFlags | SEALED | NON_SEALED | VALUE_CLASS,
460         ExtendedClassFlags                = (long)ClassFlags | SEALED | NON_SEALED | VALUE_CLASS,
461         ExtendedLocalClassFlags           = (long) LocalClassFlags | VALUE_CLASS,
462         ExtendedStaticLocalClassFlags     = (long) StaticLocalClassFlags | VALUE_CLASS,
463         ValueFieldFlags                   = (long) VarFlags | STRICT | FINAL,
464         ModifierFlags                     = ((long)StandardFlags & ~INTERFACE) | DEFAULT | SEALED | NON_SEALED | VALUE_CLASS,
465         InterfaceMethodMask               = ABSTRACT | PRIVATE | STATIC | PUBLIC | STRICTFP | DEFAULT,
466         AnnotationTypeElementMask         = ABSTRACT | PUBLIC,
467         LocalVarFlags                     = FINAL | PARAMETER,
468         ReceiverParamFlags                = PARAMETER;
469 
470     public static Set<Modifier> asModifierSet(long flags) {
471         Set<Modifier> modifiers = modifierSets.get(flags);
472         if (modifiers == null) {
473             modifiers = java.util.EnumSet.noneOf(Modifier.class);
474             if (0 != (flags & PUBLIC))    modifiers.add(Modifier.PUBLIC);
475             if (0 != (flags & PROTECTED)) modifiers.add(Modifier.PROTECTED);
476             if (0 != (flags & PRIVATE))   modifiers.add(Modifier.PRIVATE);
477             if (0 != (flags & ABSTRACT))  modifiers.add(Modifier.ABSTRACT);
478             if (0 != (flags & STATIC))    modifiers.add(Modifier.STATIC);
479             if (0 != (flags & SEALED))    modifiers.add(Modifier.SEALED);
480             if (0 != (flags & NON_SEALED))
481                                           modifiers.add(Modifier.NON_SEALED);
482             if (0 != (flags & FINAL))     modifiers.add(Modifier.FINAL);
483             if (0 != (flags & TRANSIENT)) modifiers.add(Modifier.TRANSIENT);
484             if (0 != (flags & VOLATILE))  modifiers.add(Modifier.VOLATILE);
485             if (0 != (flags & SYNCHRONIZED))
486                                           modifiers.add(Modifier.SYNCHRONIZED);
487             if (0 != (flags & NATIVE))    modifiers.add(Modifier.NATIVE);
488             if (0 != (flags & STRICTFP))  modifiers.add(Modifier.STRICTFP);
489             if (0 != (flags & DEFAULT))   modifiers.add(Modifier.DEFAULT);
490             if (0 != (flags & VALUE_CLASS))     modifiers.add(Modifier.VALUE);
491             modifiers = Collections.unmodifiableSet(modifiers);
492             modifierSets.put(flags, modifiers);
493         }
494         return modifiers;
495     }
496 
497     // Cache of modifier sets.
498     private static final Map<Long, Set<Modifier>> modifierSets = new ConcurrentHashMap<>(64);
499 
500     public static boolean isStatic(Symbol symbol) {
501         return (symbol.flags() & STATIC) != 0;
502     }
503 
504     public static boolean isEnum(Symbol symbol) {
505         return (symbol.flags() & ENUM) != 0;
506     }
507 
508     public static boolean isConstant(Symbol.VarSymbol symbol) {
509         return symbol.getConstValue() != null;
510     }
511 

512     public enum Flag {
513         PUBLIC(Flags.PUBLIC),
514         PRIVATE(Flags.PRIVATE),
515         PROTECTED(Flags.PROTECTED),
516         STATIC(Flags.STATIC),
517         FINAL(Flags.FINAL),
518         SYNCHRONIZED(Flags.SYNCHRONIZED),
519         VOLATILE(Flags.VOLATILE),
520         TRANSIENT(Flags.TRANSIENT),
521         NATIVE(Flags.NATIVE),
522         INTERFACE(Flags.INTERFACE),
523         ABSTRACT(Flags.ABSTRACT),
524         DEFAULT(Flags.DEFAULT),
525         STRICTFP(Flags.STRICTFP),
526         BRIDGE(Flags.BRIDGE),
527         SYNTHETIC(Flags.SYNTHETIC),
528         ANNOTATION(Flags.ANNOTATION),
529         DEPRECATED(Flags.DEPRECATED),
530         HASINIT(Flags.HASINIT),
531         IDENTITY_TYPE(Flags.IDENTITY_TYPE) {
532             @Override
533             public String toString() {
534                 return "identity";
535             }
536         },
537         VALUE(Flags.VALUE_CLASS),
538         IMPLICIT_CLASS(Flags.IMPLICIT_CLASS),
539         BLOCK(Flags.BLOCK),
540         FROM_SOURCE(Flags.FROM_SOURCE),
541         ENUM(Flags.ENUM),
542         MANDATED(Flags.MANDATED),
543         NOOUTERTHIS(Flags.NOOUTERTHIS),
544         EXISTS(Flags.EXISTS),
545         COMPOUND(Flags.COMPOUND),
546         CLASS_SEEN(Flags.CLASS_SEEN),
547         SOURCE_SEEN(Flags.SOURCE_SEEN),
548         LOCKED(Flags.LOCKED),
549         UNATTRIBUTED(Flags.UNATTRIBUTED),
550         ANONCONSTR(Flags.ANONCONSTR),
551         ACYCLIC(Flags.ACYCLIC),
552         PARAMETER(Flags.PARAMETER),
553         VARARGS(Flags.VARARGS),
554         ACYCLIC_ANN(Flags.ACYCLIC_ANN),
555         GENERATEDCONSTR(Flags.GENERATEDCONSTR),
556         HYPOTHETICAL(Flags.HYPOTHETICAL),
557         PROPRIETARY(Flags.PROPRIETARY),

569         AUTOMATIC_MODULE(Flags.AUTOMATIC_MODULE),
570         SYSTEM_MODULE(Flags.SYSTEM_MODULE),
571         DEPRECATED_ANNOTATION(Flags.DEPRECATED_ANNOTATION),
572         DEPRECATED_REMOVAL(Flags.DEPRECATED_REMOVAL),
573         HAS_RESOURCE(Flags.HAS_RESOURCE),
574         // Bit 48 is currently available
575         ANONCONSTR_BASED(Flags.ANONCONSTR_BASED),
576         NAME_FILLED(Flags.NAME_FILLED),
577         PREVIEW_API(Flags.PREVIEW_API),
578         PREVIEW_REFLECTIVE(Flags.PREVIEW_REFLECTIVE),
579         MATCH_BINDING(Flags.MATCH_BINDING),
580         MATCH_BINDING_TO_OUTER(Flags.MATCH_BINDING_TO_OUTER),
581         RECORD(Flags.RECORD),
582         RECOVERABLE(Flags.RECOVERABLE),
583         SEALED(Flags.SEALED),
584         NON_SEALED(Flags.NON_SEALED) {
585             @Override
586             public String toString() {
587                 return "non-sealed";
588             }
589         },
590         STRICT(Flags.STRICT);
591 
592         Flag(long flag) {
593             this.value = flag;
594             this.lowercaseName = StringUtils.toLowerCase(name());
595         }
596 
597         @Override
598         public String toString() {
599             return lowercaseName;
600         }
601 
602         final long value;
603         final String lowercaseName;
604     }
605 
606 }
< prev index next >