Package com.strobel.assembler.metadata
Class Flags
- java.lang.Object
-
- com.strobel.assembler.metadata.Flags
-
public class Flags extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFlags.Flagstatic classFlags.Kind
-
Field Summary
Fields Modifier and Type Field Description static intABSTRACTstatic intACC_BRIDGEstatic intACC_FINALstatic intACC_MANDATEDstatic intACC_MODULEstatic intACC_OPENstatic intACC_STATIC_PHASEstatic intACC_SUPERstatic intACC_SYNTHETICstatic intACC_TRANSITIVEstatic intACC_VARARGSstatic intAccessFlagsModifier masks.static intACYCLICFlag for class symbols to indicate it has been checked and found acyclic.static longACYCLIC_ANNFlag for annotation type symbols to indicate it has been checked and found acyclic.static intANNOTATIONFlag that marks attribute interfaces, added in classfile v49.0.static longAnnotationTypeElementMaskstatic intANONCONSTRFlag for synthesized default constructors of anonymous classes.static longANONYMOUSFlag that marks anonymous inner classes.static intBLOCKFlag is set for compiler-generated anonymous method symbols that `own' an initializer block.static longBRIDGEFlag that marks bridge methods.static longCLASHFlag that marks non-override equivalent methods with the same signaturestatic intCLASS_SEENFlag is set for class symbols if a class file was found for this class.static intClassFlagsModifier masks.static longCOMPACT_RECORD_CONSTRUCTORFlag to mark a record constructor as a compact onestatic intCOMPOUNDFlag is set for compiler-generated compound classes representing multiple variable boundsstatic intConstructorFlagsModifier masks.static longDEFAULTFlag that marks either a default method or an interface containing default methods.static longDEOBFUSCATEDIndicates a class has been run through the deobfuscating preprocessor.static intDEPRECATEDFlag is set if symbol is deprecated.static longEFFECTIVELY_FINALFlag that marks an 'effectively final' local variablestatic intENUMAn enumeration type or an enumeration constant, added in classfile v49.0.static intEXISTSFlag is set for package symbols if a package has a member or directory and therefore exists.static intExportsOpensFlagsModifier masks.static longExtendedClassFlagsstatic longExtendedInterfaceFlagsstatic longExtendedMemberClassFlagsstatic longExtendedMemberStaticClassFlagsstatic longExtendedStandardFlagsstatic intFINALstatic intGENERATED_MEMBERFlag is set for compiler-generated record members, it could be applied to accessors and fieldsstatic longGENERATEDCONSTRFlag that marks a generated default constructor.static intHASINITFlag is set for a variable symbol if the variable's definition has an initializer part.static longHYPOTHETICALFlag that marks a hypothetical method that need not really be generated in the binary, but is present in the symbol table to simplify checking for erasure clashes - also used for 292 poly sig methods.static intINTERFACEstatic intInterfaceMethodFlagsModifier masks.static longInterfaceMethodMaskstatic intInterfaceVarFlagsModifier masks.static intIPROXYFlag is set for compiler-generated abstract methods that implement an interface method (Miranda methods).static longLOAD_BODY_FAILEDIndicates whether an unsuccessful attempt has been made to load a method's body.static intLocalClassFlagsModifier masks.static longLocalVarFlagsstatic intLOCKEDFlag for class symbols is set and later re-set as a lock in Enter to detect cycles in the superclass/superinterface relations.static intMANDATEDAdded in SE8, represents constructs implicitly declared in source.static intMemberClassFlagsModifier masks.static intMemberStaticClassFlagsModifier masks.static intMethodFlagsModifier masks.static longModifierFlagsprivate static java.util.Map<java.lang.Long,java.util.Set<javax.lang.model.element.Modifier>>modifierSetsstatic longMODULEFlag to indicate class symbol is for module-infostatic intModuleFlagsModifier masks.static intNATIVEstatic longNON_SEALEDFlag to indicate that the class/interface was declared with the non-sealed modifier.static intNOOUTERTHISFlag is set for nested classes that do not access instance members or `this' of an outer class and therefore don't need to be passed a this$n reference.static longOVERRIDE_BRIDGEFlag that marks a special kind of bridge methods (the ones that come from restricted supertype bounds)static longPARAMETERFlag that marks formal parameters.static intPRIVATEstatic longPROPRIETARYFlag that marks an internal proprietary class.static intPROTECTEDstatic intPUBLICstatic longReceiverParamFlagsstatic longRECORDFlag to indicate that a class is a record.static intRecordMethodFlagsModifier masks.static intRequiresFlagsModifier masks.static longSEALEDFlag to indicate sealed class/interface declaration.static intSOURCE_SEENFlag is set for class symbols if a source file was found for this class.static intStandardFlagsstatic intSTATICstatic intStaticLocalFlagsModifier masks.static intSTRICTFPstatic longSUPERMirror of ACC_SUPER.static intSYNCHRONIZEDstatic intSYNTHETICstatic intTRANSIENTstatic intUNATTRIBUTEDFlag for class symbols is set and later re-set to indicate that a class has been entered but has not yet been attributed.static longUNINITIALIZED_FIELDFlag to mark a record field that was not initialized in the compact constructorstatic longUNIONFlag that marks a a multi-catch parameterstatic longVARARGSFlag that marks varargs methods.static intVarFlagsModifier masks.static intVOLATILE
-
Constructor Summary
Constructors Modifier Constructor Description privateFlags()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.EnumSet<Flags.Flag>asFlagSet(long mask)static java.util.EnumSet<Flags.Flag>asFlagSet(long mask, Flags.Kind kind)static java.util.Set<javax.lang.model.element.Modifier>asModifierSet(long flags)static longfromStandardFlags(long accessFlags, Flags.Kind kind)static booleanisEnum(TypeDefinition symbol)static booleantestAll(int value, int flags)static booleantestAll(long value, long flags)static booleantestAny(int value, int flags)static booleantestAny(long value, long flags)static inttoModifiers(long flags)static java.lang.StringtoString(long flags)static java.lang.StringtoString(long flags, Flags.Kind kind)
-
-
-
Field Detail
-
PUBLIC
public static final int PUBLIC
- See Also:
- Constant Field Values
-
PRIVATE
public static final int PRIVATE
- See Also:
- Constant Field Values
-
PROTECTED
public static final int PROTECTED
- See Also:
- Constant Field Values
-
STATIC
public static final int STATIC
- See Also:
- Constant Field Values
-
FINAL
public static final int FINAL
- See Also:
- Constant Field Values
-
SYNCHRONIZED
public static final int SYNCHRONIZED
- See Also:
- Constant Field Values
-
VOLATILE
public static final int VOLATILE
- See Also:
- Constant Field Values
-
TRANSIENT
public static final int TRANSIENT
- See Also:
- Constant Field Values
-
NATIVE
public static final int NATIVE
- See Also:
- Constant Field Values
-
INTERFACE
public static final int INTERFACE
- See Also:
- Constant Field Values
-
ABSTRACT
public static final int ABSTRACT
- See Also:
- Constant Field Values
-
STRICTFP
public static final int STRICTFP
- See Also:
- Constant Field Values
-
SYNTHETIC
public static final int SYNTHETIC
- See Also:
- Constant Field Values
-
ANNOTATION
public static final int ANNOTATION
Flag that marks attribute interfaces, added in classfile v49.0.- See Also:
- Constant Field Values
-
ENUM
public static final int ENUM
An enumeration type or an enumeration constant, added in classfile v49.0.- See Also:
- Constant Field Values
-
MANDATED
public static final int MANDATED
Added in SE8, represents constructs implicitly declared in source.- See Also:
- Constant Field Values
-
StandardFlags
public static final int StandardFlags
- See Also:
- Constant Field Values
-
ACC_FINAL
public static final int ACC_FINAL
- See Also:
- Constant Field Values
-
ACC_SUPER
public static final int ACC_SUPER
- See Also:
- Constant Field Values
-
ACC_BRIDGE
public static final int ACC_BRIDGE
- See Also:
- Constant Field Values
-
ACC_VARARGS
public static final int ACC_VARARGS
- See Also:
- Constant Field Values
-
ACC_MODULE
public static final int ACC_MODULE
- See Also:
- Constant Field Values
-
ACC_OPEN
public static final int ACC_OPEN
- See Also:
- Constant Field Values
-
ACC_SYNTHETIC
public static final int ACC_SYNTHETIC
- See Also:
- Constant Field Values
-
ACC_MANDATED
public static final int ACC_MANDATED
- See Also:
- Constant Field Values
-
ACC_TRANSITIVE
public static final int ACC_TRANSITIVE
- See Also:
- Constant Field Values
-
ACC_STATIC_PHASE
public static final int ACC_STATIC_PHASE
- See Also:
- Constant Field Values
-
DEPRECATED
public static final int DEPRECATED
Flag is set if symbol is deprecated.- See Also:
- Constant Field Values
-
HASINIT
public static final int HASINIT
Flag is set for a variable symbol if the variable's definition has an initializer part.- See Also:
- Constant Field Values
-
BLOCK
public static final int BLOCK
Flag is set for compiler-generated anonymous method symbols that `own' an initializer block.- See Also:
- Constant Field Values
-
IPROXY
public static final int IPROXY
Flag is set for compiler-generated abstract methods that implement an interface method (Miranda methods).- See Also:
- Constant Field Values
-
NOOUTERTHIS
public static final int NOOUTERTHIS
Flag is set for nested classes that do not access instance members or `this' of an outer class and therefore don't need to be passed a this$n reference. This flag is currently set only for anonymous classes in superclass constructor calls and only for pre 1.4 targets. todo: use this flag for optimizing away this$n parameters in other cases.- See Also:
- Constant Field Values
-
EXISTS
public static final int EXISTS
Flag is set for package symbols if a package has a member or directory and therefore exists.- See Also:
- Constant Field Values
-
COMPOUND
public static final int COMPOUND
Flag is set for compiler-generated compound classes representing multiple variable bounds- See Also:
- Constant Field Values
-
CLASS_SEEN
public static final int CLASS_SEEN
Flag is set for class symbols if a class file was found for this class.- See Also:
- Constant Field Values
-
SOURCE_SEEN
public static final int SOURCE_SEEN
Flag is set for class symbols if a source file was found for this class.- See Also:
- Constant Field Values
-
LOCKED
public static final int LOCKED
Flag for class symbols is set and later re-set as a lock in Enter to detect cycles in the superclass/superinterface relations. Similarly for constructor call cycle detection in Attr.- See Also:
- Constant Field Values
-
UNATTRIBUTED
public static final int UNATTRIBUTED
Flag for class symbols is set and later re-set to indicate that a class has been entered but has not yet been attributed.- See Also:
- Constant Field Values
-
ANONCONSTR
public static final int ANONCONSTR
Flag for synthesized default constructors of anonymous classes.- See Also:
- Constant Field Values
-
ACYCLIC
public static final int ACYCLIC
Flag for class symbols to indicate it has been checked and found acyclic.- See Also:
- Constant Field Values
-
BRIDGE
public static final long BRIDGE
Flag that marks bridge methods.- See Also:
- Constant Field Values
-
PARAMETER
public static final long PARAMETER
Flag that marks formal parameters.- See Also:
- Constant Field Values
-
VARARGS
public static final long VARARGS
Flag that marks varargs methods.- See Also:
- Constant Field Values
-
ACYCLIC_ANN
public static final long ACYCLIC_ANN
Flag for annotation type symbols to indicate it has been checked and found acyclic.- See Also:
- Constant Field Values
-
GENERATEDCONSTR
public static final long GENERATEDCONSTR
Flag that marks a generated default constructor.- See Also:
- Constant Field Values
-
HYPOTHETICAL
public static final long HYPOTHETICAL
Flag that marks a hypothetical method that need not really be generated in the binary, but is present in the symbol table to simplify checking for erasure clashes - also used for 292 poly sig methods.- See Also:
- Constant Field Values
-
PROPRIETARY
public static final long PROPRIETARY
Flag that marks an internal proprietary class.- See Also:
- Constant Field Values
-
UNION
public static final long UNION
Flag that marks a a multi-catch parameter- See Also:
- Constant Field Values
-
OVERRIDE_BRIDGE
public static final long OVERRIDE_BRIDGE
Flag that marks a special kind of bridge methods (the ones that come from restricted supertype bounds)- See Also:
- Constant Field Values
-
EFFECTIVELY_FINAL
public static final long EFFECTIVELY_FINAL
Flag that marks an 'effectively final' local variable- See Also:
- Constant Field Values
-
CLASH
public static final long CLASH
Flag that marks non-override equivalent methods with the same signature- See Also:
- Constant Field Values
-
DEFAULT
public static final long DEFAULT
Flag that marks either a default method or an interface containing default methods.- See Also:
- Constant Field Values
-
ANONYMOUS
public static final long ANONYMOUS
Flag that marks anonymous inner classes.- See Also:
- Constant Field Values
-
SUPER
public static final long SUPER
Mirror of ACC_SUPER.- See Also:
- Constant Field Values
-
LOAD_BODY_FAILED
public static final long LOAD_BODY_FAILED
Indicates whether an unsuccessful attempt has been made to load a method's body.- See Also:
- Constant Field Values
-
DEOBFUSCATED
public static final long DEOBFUSCATED
Indicates a class has been run through the deobfuscating preprocessor.- See Also:
- Constant Field Values
-
MODULE
public static final long MODULE
Flag to indicate class symbol is for module-info- See Also:
- Constant Field Values
-
RECORD
public static final long RECORD
Flag to indicate that a class is a record. The flag is also used to mark fields that are part of the state vector of a record and to mark the canonical constructor- See Also:
- Constant Field Values
-
COMPACT_RECORD_CONSTRUCTOR
public static final long COMPACT_RECORD_CONSTRUCTOR
Flag to mark a record constructor as a compact one- See Also:
- Constant Field Values
-
UNINITIALIZED_FIELD
public static final long UNINITIALIZED_FIELD
Flag to mark a record field that was not initialized in the compact constructor- See Also:
- Constant Field Values
-
GENERATED_MEMBER
public static final int GENERATED_MEMBER
Flag is set for compiler-generated record members, it could be applied to accessors and fields- See Also:
- Constant Field Values
-
SEALED
public static final long SEALED
Flag to indicate sealed class/interface declaration.- See Also:
- Constant Field Values
-
NON_SEALED
public static final long NON_SEALED
Flag to indicate that the class/interface was declared with the non-sealed modifier.- See Also:
- Constant Field Values
-
ModuleFlags
public static final int ModuleFlags
Modifier masks.- See Also:
- Constant Field Values
-
RequiresFlags
public static final int RequiresFlags
Modifier masks.- See Also:
- Constant Field Values
-
ExportsOpensFlags
public static final int ExportsOpensFlags
Modifier masks.- See Also:
- Constant Field Values
-
AccessFlags
public static final int AccessFlags
Modifier masks.- See Also:
- Constant Field Values
-
LocalClassFlags
public static final int LocalClassFlags
Modifier masks.- See Also:
- Constant Field Values
-
StaticLocalFlags
public static final int StaticLocalFlags
Modifier masks.- See Also:
- Constant Field Values
-
MemberClassFlags
public static final int MemberClassFlags
Modifier masks.- See Also:
- Constant Field Values
-
MemberStaticClassFlags
public static final int MemberStaticClassFlags
Modifier masks.- See Also:
- Constant Field Values
-
ClassFlags
public static final int ClassFlags
Modifier masks.- See Also:
- Constant Field Values
-
InterfaceVarFlags
public static final int InterfaceVarFlags
Modifier masks.- See Also:
- Constant Field Values
-
VarFlags
public static final int VarFlags
Modifier masks.- See Also:
- Constant Field Values
-
ConstructorFlags
public static final int ConstructorFlags
Modifier masks.- See Also:
- Constant Field Values
-
InterfaceMethodFlags
public static final int InterfaceMethodFlags
Modifier masks.- See Also:
- Constant Field Values
-
MethodFlags
public static final int MethodFlags
Modifier masks.- See Also:
- Constant Field Values
-
RecordMethodFlags
public static final int RecordMethodFlags
Modifier masks.- See Also:
- Constant Field Values
-
ExtendedInterfaceFlags
public static final long ExtendedInterfaceFlags
- See Also:
- Constant Field Values
-
ExtendedStandardFlags
public static final long ExtendedStandardFlags
- See Also:
- Constant Field Values
-
ExtendedMemberClassFlags
public static final long ExtendedMemberClassFlags
- See Also:
- Constant Field Values
-
ExtendedMemberStaticClassFlags
public static final long ExtendedMemberStaticClassFlags
- See Also:
- Constant Field Values
-
ExtendedClassFlags
public static final long ExtendedClassFlags
- See Also:
- Constant Field Values
-
ModifierFlags
public static final long ModifierFlags
- See Also:
- Constant Field Values
-
InterfaceMethodMask
public static final long InterfaceMethodMask
- See Also:
- Constant Field Values
-
AnnotationTypeElementMask
public static final long AnnotationTypeElementMask
- See Also:
- Constant Field Values
-
LocalVarFlags
public static final long LocalVarFlags
- See Also:
- Constant Field Values
-
ReceiverParamFlags
public static final long ReceiverParamFlags
- See Also:
- Constant Field Values
-
modifierSets
private static final java.util.Map<java.lang.Long,java.util.Set<javax.lang.model.element.Modifier>> modifierSets
-
-
Method Detail
-
toString
public static java.lang.String toString(long flags)
-
toString
public static java.lang.String toString(long flags, Flags.Kind kind)
-
asFlagSet
public static java.util.EnumSet<Flags.Flag> asFlagSet(long mask)
-
asFlagSet
public static java.util.EnumSet<Flags.Flag> asFlagSet(long mask, Flags.Kind kind)
-
asModifierSet
public static java.util.Set<javax.lang.model.element.Modifier> asModifierSet(long flags)
-
toModifiers
public static int toModifiers(long flags)
-
testAny
public static boolean testAny(int value, int flags)
-
testAll
public static boolean testAll(int value, int flags)
-
testAny
public static boolean testAny(long value, long flags)
-
testAll
public static boolean testAll(long value, long flags)
-
isEnum
public static boolean isEnum(TypeDefinition symbol)
-
fromStandardFlags
public static long fromStandardFlags(long accessFlags, Flags.Kind kind)
-
-