blob: ac8bb3749f918eb148aa73883abfdec67f59600d [file] [log] [blame]
Stuart McCullochbb014372012-06-07 21:57:32 +00001package aQute.bnd.compatibility;
2
3import java.lang.reflect.*;
4
5/**
6 * Access modifier
7 */
8public enum Access {
9 PUBLIC, PROTECTED, PACKAGE, PRIVATE, UNKNOWN;
10
11 public static Access modifier(int mod) {
12 if (Modifier.isPublic(mod))
13 return PUBLIC;
14 if (Modifier.isProtected(mod))
15 return PROTECTED;
16 if (Modifier.isPrivate(mod))
17 return PRIVATE;
18
19 return PACKAGE;
20 }
21
22 public String toString() {
23 return super.toString().toLowerCase();
24 }
25}