Lines Matching defs:PUBLIC
5 * The contents of this file are subject to the Mozilla Public License Version
8 * the terms of the GNU Lesser General Public License Version 2.1 or later.
20 * for access modifiers such as public, rivate, ...
22 public class AccessFlag {
23 public static final int PUBLIC = 0x0001;
24 public static final int PRIVATE = 0x0002;
25 public static final int PROTECTED = 0x0004;
26 public static final int STATIC = 0x0008;
27 public static final int FINAL = 0x0010;
28 public static final int SYNCHRONIZED = 0x0020;
29 public static final int VOLATILE = 0x0040;
30 public static final int BRIDGE = 0x0040; // for method_info
31 public static final int TRANSIENT = 0x0080;
32 public static final int VARARGS = 0x0080; // for method_info
33 public static final int NATIVE = 0x0100;
34 public static final int INTERFACE = 0x0200;
35 public static final int ABSTRACT = 0x0400;
36 public static final int STRICT = 0x0800;
37 public static final int SYNTHETIC = 0x1000;
38 public static final int ANNOTATION = 0x2000;
39 public static final int ENUM = 0x4000;
41 public static final int SUPER = 0x0020;
47 * Truns the public bit on. The protected and private bits are
50 public static int setPublic(int accflags) {
51 return (accflags & ~(PRIVATE | PROTECTED)) | PUBLIC;
55 * Truns the protected bit on. The protected and public bits are
58 public static int setProtected(int accflags) {
59 return (accflags & ~(PRIVATE | PUBLIC)) | PROTECTED;
66 public static int setPrivate(int accflags) {
67 return (accflags & ~(PROTECTED | PUBLIC)) | PRIVATE;
71 * Clears the public, protected, and private bits.
73 public static int setPackage(int accflags) {
74 return (accflags & ~(PROTECTED | PUBLIC | PRIVATE));
78 * Returns true if the access flags include the public bit.
80 public static boolean isPublic(int accflags) {
81 return (accflags & PUBLIC) != 0;
87 public static boolean isProtected(int accflags) {
94 public static boolean isPrivate(int accflags) {
99 * Returns true if the access flags include neither public, protected,
102 public static boolean isPackage(int accflags) {
103 return (accflags & (PROTECTED | PUBLIC | PRIVATE)) == 0;
109 public static int clear(int accflags, int clearBit) {
119 public static int of(int modifier) {
129 public static int toModifier(int accflags) {