Class AccessFlag


  • public class AccessFlag
    extends java.lang.Object
    A support class providing static methods and constants for access modifiers such as public, private, ...
    • Constructor Summary

      Constructors 
      Constructor Description
      AccessFlag()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int clear​(int accflags, int clearBit)
      Clears a specified bit in accflags.
      static boolean isPackage​(int accflags)
      Returns true if the access flags include neither public, protected, or private.
      static boolean isPrivate​(int accflags)
      Returns true if the access flags include the private bit.
      static boolean isProtected​(int accflags)
      Returns true if the access flags include the protected bit.
      static boolean isPublic​(int accflags)
      Returns true if the access flags include the public bit.
      static int of​(int modifier)
      Converts a javassist.Modifier into a javassist.bytecode.AccessFlag.
      static int setPackage​(int accflags)
      Clears the public, protected, and private bits.
      static int setPrivate​(int accflags)
      Truns the private bit on.
      static int setProtected​(int accflags)
      Turns the protected bit on.
      static int setPublic​(int accflags)
      Turns the public bit on.
      static int toModifier​(int accflags)
      Converts a javassist.bytecode.AccessFlag into a javassist.Modifier.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AccessFlag

        public AccessFlag()
    • Method Detail

      • setPublic

        public static int setPublic​(int accflags)
        Turns the public bit on. The protected and private bits are cleared.
      • setProtected

        public static int setProtected​(int accflags)
        Turns the protected bit on. The protected and public bits are cleared.
      • setPrivate

        public static int setPrivate​(int accflags)
        Truns the private bit on. The protected and private bits are cleared.
      • setPackage

        public static int setPackage​(int accflags)
        Clears the public, protected, and private bits.
      • isPublic

        public static boolean isPublic​(int accflags)
        Returns true if the access flags include the public bit.
      • isProtected

        public static boolean isProtected​(int accflags)
        Returns true if the access flags include the protected bit.
      • isPrivate

        public static boolean isPrivate​(int accflags)
        Returns true if the access flags include the private bit.
      • isPackage

        public static boolean isPackage​(int accflags)
        Returns true if the access flags include neither public, protected, or private.
      • clear

        public static int clear​(int accflags,
                                int clearBit)
        Clears a specified bit in accflags.
      • of

        public static int of​(int modifier)
        Converts a javassist.Modifier into a javassist.bytecode.AccessFlag.
        Parameters:
        modifier - javassist.Modifier
      • toModifier

        public static int toModifier​(int accflags)
        Converts a javassist.bytecode.AccessFlag into a javassist.Modifier.
        Parameters:
        accflags - javassist.bytecode.Accessflag