< prev index next >

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

Print this page




  96     public static final int ENUM         = 1<<14;
  97 
  98     /** Added in SE8, represents constructs implicitly declared in source. */
  99     public static final int MANDATED     = 1<<15;
 100 
 101     public static final int StandardFlags = 0x0fff;
 102 
 103     // Because the following access flags are overloaded with other
 104     // bit positions, we translate them when reading and writing class
 105     // files into unique bits positions: ACC_SYNTHETIC <-> SYNTHETIC,
 106     // for example.
 107     public static final int ACC_SUPER    = 0x0020;
 108     public static final int ACC_BRIDGE   = 0x0040;
 109     public static final int ACC_VARARGS  = 0x0080;
 110     public static final int ACC_MODULE   = 0x8000;
 111 
 112     /*****************************************
 113      * Internal compiler flags (no bits in the lower 16).
 114      *****************************************/
 115 
 116     /** Flag is set if symbol is deprecated.
 117      */
 118     public static final int DEPRECATED   = 1<<17;
 119 
 120     /** Flag is set for a variable symbol if the variable's definition
 121      *  has an initializer part.
 122      */
 123     public static final int HASINIT          = 1<<18;
 124 
 125     /** Flag is set for compiler-generated anonymous method symbols
 126      *  that `own' an initializer block.
 127      */
 128     public static final int BLOCK            = 1<<20;
 129 
 130     /** Flag bit 21 is available. (used earlier to tag compiler-generated abstract methods that implement
 131      *  an interface method (Miranda methods)).
 132      */
 133 
 134     /** Flag is set for nested classes that do not access instance members
 135      *  or `this' of an outer class and therefore don't need to be passed
 136      *  a this$n reference.  This value is currently set only for anonymous


 276     /**
 277      * Flag to control recursion in TransTypes
 278      */
 279     public static final long TYPE_TRANSLATED = 1L<<50;
 280 
 281     /**
 282      * Flag to indicate class symbol is for module-info
 283      */
 284     public static final long MODULE = 1L<<51;
 285 
 286     /**
 287      * Flag to indicate the given ModuleSymbol is an automatic module.
 288      */
 289     public static final long AUTOMATIC_MODULE = 1L<<52;
 290 
 291     /**
 292      * Flag to indicate the given ModuleSymbol is a system module.
 293      */
 294     public static final long SYSTEM_MODULE = 1L<<53;
 295 





 296     /** Modifier masks.
 297      */
 298     public static final int
 299         AccessFlags           = PUBLIC | PROTECTED | PRIVATE,
 300         LocalClassFlags       = FINAL | ABSTRACT | STRICTFP | ENUM | SYNTHETIC,
 301         MemberClassFlags      = LocalClassFlags | INTERFACE | AccessFlags,
 302         ClassFlags            = LocalClassFlags | INTERFACE | PUBLIC | ANNOTATION,
 303         InterfaceVarFlags     = FINAL | STATIC | PUBLIC,
 304         VarFlags              = AccessFlags | FINAL | STATIC |
 305                                 VOLATILE | TRANSIENT | ENUM,
 306         ConstructorFlags      = AccessFlags,
 307         InterfaceMethodFlags  = ABSTRACT | PUBLIC,
 308         MethodFlags           = AccessFlags | ABSTRACT | STATIC | NATIVE |
 309                                 SYNCHRONIZED | FINAL | STRICTFP;
 310     public static final long
 311         ExtendedStandardFlags       = (long)StandardFlags | DEFAULT,
 312         ModifierFlags               = ((long)StandardFlags & ~INTERFACE) | DEFAULT,
 313         InterfaceMethodMask         = ABSTRACT | PRIVATE | STATIC | PUBLIC | STRICTFP | DEFAULT,
 314         AnnotationTypeElementMask   = ABSTRACT | PUBLIC,
 315         LocalVarFlags               = FINAL | PARAMETER,


 385         LOCKED(Flags.LOCKED),
 386         UNATTRIBUTED(Flags.UNATTRIBUTED),
 387         ANONCONSTR(Flags.ANONCONSTR),
 388         ACYCLIC(Flags.ACYCLIC),
 389         PARAMETER(Flags.PARAMETER),
 390         VARARGS(Flags.VARARGS),
 391         ACYCLIC_ANN(Flags.ACYCLIC_ANN),
 392         GENERATEDCONSTR(Flags.GENERATEDCONSTR),
 393         HYPOTHETICAL(Flags.HYPOTHETICAL),
 394         PROPRIETARY(Flags.PROPRIETARY),
 395         UNION(Flags.UNION),
 396         EFFECTIVELY_FINAL(Flags.EFFECTIVELY_FINAL),
 397         CLASH(Flags.CLASH),
 398         AUXILIARY(Flags.AUXILIARY),
 399         NOT_IN_PROFILE(Flags.NOT_IN_PROFILE),
 400         BAD_OVERRIDE(Flags.BAD_OVERRIDE),
 401         SIGNATURE_POLYMORPHIC(Flags.SIGNATURE_POLYMORPHIC),
 402         THROWS(Flags.THROWS),
 403         LAMBDA_METHOD(Flags.LAMBDA_METHOD),
 404         TYPE_TRANSLATED(Flags.TYPE_TRANSLATED),
 405         MODULE(Flags.MODULE);

 406 
 407         Flag(long flag) {
 408             this.value = flag;
 409             this.lowercaseName = StringUtils.toLowerCase(name());
 410         }
 411 
 412         @Override
 413         public String toString() {
 414             return lowercaseName;
 415         }
 416 
 417         final long value;
 418         final String lowercaseName;
 419     }
 420 
 421 }


  96     public static final int ENUM         = 1<<14;
  97 
  98     /** Added in SE8, represents constructs implicitly declared in source. */
  99     public static final int MANDATED     = 1<<15;
 100 
 101     public static final int StandardFlags = 0x0fff;
 102 
 103     // Because the following access flags are overloaded with other
 104     // bit positions, we translate them when reading and writing class
 105     // files into unique bits positions: ACC_SYNTHETIC <-> SYNTHETIC,
 106     // for example.
 107     public static final int ACC_SUPER    = 0x0020;
 108     public static final int ACC_BRIDGE   = 0x0040;
 109     public static final int ACC_VARARGS  = 0x0080;
 110     public static final int ACC_MODULE   = 0x8000;
 111 
 112     /*****************************************
 113      * Internal compiler flags (no bits in the lower 16).
 114      *****************************************/
 115 
 116     /** Flag is set if symbol is deprecated.  See also DEPRECATED_REMOVAL.
 117      */
 118     public static final int DEPRECATED   = 1<<17;
 119 
 120     /** Flag is set for a variable symbol if the variable's definition
 121      *  has an initializer part.
 122      */
 123     public static final int HASINIT          = 1<<18;
 124 
 125     /** Flag is set for compiler-generated anonymous method symbols
 126      *  that `own' an initializer block.
 127      */
 128     public static final int BLOCK            = 1<<20;
 129 
 130     /** Flag bit 21 is available. (used earlier to tag compiler-generated abstract methods that implement
 131      *  an interface method (Miranda methods)).
 132      */
 133 
 134     /** Flag is set for nested classes that do not access instance members
 135      *  or `this' of an outer class and therefore don't need to be passed
 136      *  a this$n reference.  This value is currently set only for anonymous


 276     /**
 277      * Flag to control recursion in TransTypes
 278      */
 279     public static final long TYPE_TRANSLATED = 1L<<50;
 280 
 281     /**
 282      * Flag to indicate class symbol is for module-info
 283      */
 284     public static final long MODULE = 1L<<51;
 285 
 286     /**
 287      * Flag to indicate the given ModuleSymbol is an automatic module.
 288      */
 289     public static final long AUTOMATIC_MODULE = 1L<<52;
 290 
 291     /**
 292      * Flag to indicate the given ModuleSymbol is a system module.
 293      */
 294     public static final long SYSTEM_MODULE = 1L<<53;
 295 
 296     /**
 297      * Flag to indicate the given symbol has been deprecated and marked for removal.
 298      */
 299     public static final long DEPRECATED_REMOVAL = 1L<<54;
 300 
 301     /** Modifier masks.
 302      */
 303     public static final int
 304         AccessFlags           = PUBLIC | PROTECTED | PRIVATE,
 305         LocalClassFlags       = FINAL | ABSTRACT | STRICTFP | ENUM | SYNTHETIC,
 306         MemberClassFlags      = LocalClassFlags | INTERFACE | AccessFlags,
 307         ClassFlags            = LocalClassFlags | INTERFACE | PUBLIC | ANNOTATION,
 308         InterfaceVarFlags     = FINAL | STATIC | PUBLIC,
 309         VarFlags              = AccessFlags | FINAL | STATIC |
 310                                 VOLATILE | TRANSIENT | ENUM,
 311         ConstructorFlags      = AccessFlags,
 312         InterfaceMethodFlags  = ABSTRACT | PUBLIC,
 313         MethodFlags           = AccessFlags | ABSTRACT | STATIC | NATIVE |
 314                                 SYNCHRONIZED | FINAL | STRICTFP;
 315     public static final long
 316         ExtendedStandardFlags       = (long)StandardFlags | DEFAULT,
 317         ModifierFlags               = ((long)StandardFlags & ~INTERFACE) | DEFAULT,
 318         InterfaceMethodMask         = ABSTRACT | PRIVATE | STATIC | PUBLIC | STRICTFP | DEFAULT,
 319         AnnotationTypeElementMask   = ABSTRACT | PUBLIC,
 320         LocalVarFlags               = FINAL | PARAMETER,


 390         LOCKED(Flags.LOCKED),
 391         UNATTRIBUTED(Flags.UNATTRIBUTED),
 392         ANONCONSTR(Flags.ANONCONSTR),
 393         ACYCLIC(Flags.ACYCLIC),
 394         PARAMETER(Flags.PARAMETER),
 395         VARARGS(Flags.VARARGS),
 396         ACYCLIC_ANN(Flags.ACYCLIC_ANN),
 397         GENERATEDCONSTR(Flags.GENERATEDCONSTR),
 398         HYPOTHETICAL(Flags.HYPOTHETICAL),
 399         PROPRIETARY(Flags.PROPRIETARY),
 400         UNION(Flags.UNION),
 401         EFFECTIVELY_FINAL(Flags.EFFECTIVELY_FINAL),
 402         CLASH(Flags.CLASH),
 403         AUXILIARY(Flags.AUXILIARY),
 404         NOT_IN_PROFILE(Flags.NOT_IN_PROFILE),
 405         BAD_OVERRIDE(Flags.BAD_OVERRIDE),
 406         SIGNATURE_POLYMORPHIC(Flags.SIGNATURE_POLYMORPHIC),
 407         THROWS(Flags.THROWS),
 408         LAMBDA_METHOD(Flags.LAMBDA_METHOD),
 409         TYPE_TRANSLATED(Flags.TYPE_TRANSLATED),
 410         MODULE(Flags.MODULE),
 411         DEPRECATED_REMOVAL(Flags.DEPRECATED_REMOVAL);
 412 
 413         Flag(long flag) {
 414             this.value = flag;
 415             this.lowercaseName = StringUtils.toLowerCase(name());
 416         }
 417 
 418         @Override
 419         public String toString() {
 420             return lowercaseName;
 421         }
 422 
 423         final long value;
 424         final String lowercaseName;
 425     }
 426 
 427 }
< prev index next >