code: public boolean checkAccess(AccessFlags flags){
  
          boolean isPublic = flags.is(AccessFlags.ACC_PUBLIC);
          boolean isProtected = flags.is(AccessFlags.ACC_PROTECTED);
          boolean isPrivate = flags.is(AccessFlags.ACC_PRIVATE);
          boolean isPackage = !(isPublic || isProtected || isPrivate);
  
          if ((showAccess == AccessFlags.ACC_PUBLIC) && (isProtected || isPrivate || isPackage))
              return false;
          else if ((showAccess == AccessFlags.ACC_PROTECTED) && (isPrivate || isPackage))
              return false;
          else if ((showAccess == 0) && (isPrivate))
              return false;
          else
              return true;
      }
docs: Checks access of class, field or method.