Class Flags

java.lang.Object
com.strobel.reflection.Flags

public class Flags extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
    Modifier masks.
    static final int
    Flag for class symbols to indicate it has been checked and found acyclic.
    static final long
    Flag for annotation type symbols to indicate it has been checked and found acyclic.
    static final int
    Flag that marks attribute interfaces, added in classfile v49.0.
    static final int
    Flag for synthesized default constructors of anonymous classes.
    static final int
    Flag is set for compiler-generated anonymous method symbols that `own' an initializer block.
    static final long
    Flag that marks bridge methods.
    static final long
    Flag that marks non-override equivalent methods with the same signature
    static final int
    Flag is set for class symbols if a class file was found for this class.
    static final int
    Modifier masks.
    static final int
    Flag is set for compiler-generated compound classes representing multiple variable bounds
    static final int
    Modifier masks.
    static final long
    Flag that marks either a default method or an interface containing default methods.
    static final int
    Flag is set if symbol is deprecated.
    static final long
    Flag that marks an 'effectively final' local variable
    static final int
    An enumeration type or an enumeration constant, added in classfile v49.0.
    static final int
    Flag is set for package symbols if a package has a member or directory and therefore exists.
    static final int
     
    static final long
    Flag that marks a generated default constructor.
    static final int
    Flag is set for a variable symbol if the variable's definition has an initializer part.
    static final long
    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.
    static final int
     
    static final int
    Modifier masks.
    static final int
    Modifier masks.
    static final int
    Flag is set for compiler-generated abstract methods that implement an interface method (Miranda methods).
    static final int
    Modifier masks.
    static final long
     
    static final int
    Flag for class symbols is set and later re-set as a lock in Enter to detect cycles in the superclass/superinterface relations.
    static final int
    Modifier masks.
    static final int
    Modifier masks.
    static final int
     
    private static final Map<Long,Set<Modifier>>
     
    static final int
     
    static final int
    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.
    static final long
    Flag that marks a special kind of bridge methods (the ones that come from restricted supertype bounds)
    static final long
    Flag that marks formal parameters.
    static final int
     
    static final long
    Flag that marks an internal proprietary class.
    static final int
     
    static final int
     
    static final int
    Flag is set for class symbols if a source file was found for this class.
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
    Flag for class symbols is set and later re-set to indicate that a class has been entered but has not yet been attributed.
    static final long
    Flag that marks a a multi-catch parameter
    static final long
    Flag that marks varargs methods.
    static final int
    Modifier masks.
    static final int
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    asFlagSet(long mask)
     
    static Set<Modifier>
    asModifierSet(long flags)
     
    static Set<Modifier>
    asModifierSet(MemberType memberType, long flags)
     
    static boolean
     
    static boolean
    testAll(int value, int flags)
     
    static boolean
    testAll(long value, long flags)
     
    static boolean
    testAny(int value, int flags)
     
    static boolean
    testAny(long value, long flags)
     
    static String
    toString(long flags)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • PUBLIC

      public static final int PUBLIC
      See Also:
    • PRIVATE

      public static final int PRIVATE
      See Also:
    • PROTECTED

      public static final int PROTECTED
      See Also:
    • STATIC

      public static final int STATIC
      See Also:
    • FINAL

      public static final int FINAL
      See Also:
    • SYNCHRONIZED

      public static final int SYNCHRONIZED
      See Also:
    • VOLATILE

      public static final int VOLATILE
      See Also:
    • TRANSIENT

      public static final int TRANSIENT
      See Also:
    • NATIVE

      public static final int NATIVE
      See Also:
    • INTERFACE

      public static final int INTERFACE
      See Also:
    • ABSTRACT

      public static final int ABSTRACT
      See Also:
    • STRICTFP

      public static final int STRICTFP
      See Also:
    • SYNTHETIC

      public static final int SYNTHETIC
      See Also:
    • ANNOTATION

      public static final int ANNOTATION
      Flag that marks attribute interfaces, added in classfile v49.0.
      See Also:
    • ENUM

      public static final int ENUM
      An enumeration type or an enumeration constant, added in classfile v49.0.
      See Also:
    • StandardFlags

      public static final int StandardFlags
      See Also:
    • ModifierFlags

      public static final int ModifierFlags
      See Also:
    • ACC_SUPER

      public static final int ACC_SUPER
      See Also:
    • ACC_BRIDGE

      public static final int ACC_BRIDGE
      See Also:
    • ACC_VARARGS

      public static final int ACC_VARARGS
      See Also:
    • ACC_SYNTHETIC

      public static final int ACC_SYNTHETIC
      See Also:
    • DEPRECATED

      public static final int DEPRECATED
      Flag is set if symbol is deprecated.
      See Also:
    • HASINIT

      public static final int HASINIT
      Flag is set for a variable symbol if the variable's definition has an initializer part.
      See Also:
    • BLOCK

      public static final int BLOCK
      Flag is set for compiler-generated anonymous method symbols that `own' an initializer block.
      See Also:
    • IPROXY

      public static final int IPROXY
      Flag is set for compiler-generated abstract methods that implement an interface method (Miranda methods).
      See Also:
    • 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:
    • 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:
    • COMPOUND

      public static final int COMPOUND
      Flag is set for compiler-generated compound classes representing multiple variable bounds
      See Also:
    • 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:
    • 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:
    • 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:
    • 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:
    • ANONCONSTR

      public static final int ANONCONSTR
      Flag for synthesized default constructors of anonymous classes.
      See Also:
    • ACYCLIC

      public static final int ACYCLIC
      Flag for class symbols to indicate it has been checked and found acyclic.
      See Also:
    • BRIDGE

      public static final long BRIDGE
      Flag that marks bridge methods.
      See Also:
    • PARAMETER

      public static final long PARAMETER
      Flag that marks formal parameters.
      See Also:
    • VARARGS

      public static final long VARARGS
      Flag that marks varargs methods.
      See Also:
    • ACYCLIC_ANN

      public static final long ACYCLIC_ANN
      Flag for annotation type symbols to indicate it has been checked and found acyclic.
      See Also:
    • GENERATEDCONSTR

      public static final long GENERATEDCONSTR
      Flag that marks a generated default constructor.
      See Also:
    • 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:
    • PROPRIETARY

      public static final long PROPRIETARY
      Flag that marks an internal proprietary class.
      See Also:
    • UNION

      public static final long UNION
      Flag that marks a a multi-catch parameter
      See Also:
    • 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:
    • EFFECTIVELY_FINAL

      public static final long EFFECTIVELY_FINAL
      Flag that marks an 'effectively final' local variable
      See Also:
    • CLASH

      public static final long CLASH
      Flag that marks non-override equivalent methods with the same signature
      See Also:
    • DEFAULT

      public static final long DEFAULT
      Flag that marks either a default method or an interface containing default methods.
      See Also:
    • AccessFlags

      public static final int AccessFlags
      Modifier masks.
      See Also:
    • LocalClassFlags

      public static final int LocalClassFlags
      Modifier masks.
      See Also:
    • MemberClassFlags

      public static final int MemberClassFlags
      Modifier masks.
      See Also:
    • ClassFlags

      public static final int ClassFlags
      Modifier masks.
      See Also:
    • InterfaceVarFlags

      public static final int InterfaceVarFlags
      Modifier masks.
      See Also:
    • VarFlags

      public static final int VarFlags
      Modifier masks.
      See Also:
    • ConstructorFlags

      public static final int ConstructorFlags
      Modifier masks.
      See Also:
    • InterfaceMethodFlags

      public static final int InterfaceMethodFlags
      Modifier masks.
      See Also:
    • MethodFlags

      public static final int MethodFlags
      Modifier masks.
      See Also:
    • LocalVarFlags

      public static final long LocalVarFlags
      See Also:
    • modifierSets

      private static final Map<Long,Set<Modifier>> modifierSets
  • Constructor Details

    • Flags

      private Flags()
  • Method Details

    • toString

      public static String toString(long flags)
    • asFlagSet

      public static EnumSet<Flags.Flag> asFlagSet(long mask)
    • asModifierSet

      public static Set<Modifier> asModifierSet(long flags)
    • asModifierSet

      public static Set<Modifier> asModifierSet(MemberType memberType, 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(MemberInfo symbol)