26 package java.lang.reflect;
27
28 import java.security.AccessController;
29 import sun.reflect.LangReflectAccess;
30 import sun.reflect.ReflectionFactory;
31
32 /**
33 * The Modifier class provides {@code static} methods and
34 * constants to decode class and member access modifiers. The sets of
35 * modifiers are represented as integers with distinct bit positions
36 * representing different modifiers. The values for the constants
37 * representing the modifiers are taken from the tables in sections 4.1, 4.4, 4.5, and 4.7 of
38 * <cite>The Java™ Virtual Machine Specification</cite>.
39 *
40 * @see Class#getModifiers()
41 * @see Member#getModifiers()
42 *
43 * @author Nakul Saraiya
44 * @author Kenneth Russell
45 */
46 public
47 class Modifier {
48
49 /*
50 * Bootstrapping protocol between java.lang and java.lang.reflect
51 * packages
52 */
53 static {
54 sun.reflect.ReflectionFactory factory =
55 AccessController.doPrivileged(
56 new ReflectionFactory.GetReflectionFactoryAction());
57 factory.setLangReflectAccess(new java.lang.reflect.ReflectAccess());
58 }
59
60 /**
61 * Return {@code true} if the integer argument includes the
62 * {@code public} modifier, {@code false} otherwise.
63 *
64 * @param mod a set of modifiers
65 * @return {@code true} if {@code mod} includes the
66 * {@code public} modifier; {@code false} otherwise.
67 */
|
26 package java.lang.reflect;
27
28 import java.security.AccessController;
29 import sun.reflect.LangReflectAccess;
30 import sun.reflect.ReflectionFactory;
31
32 /**
33 * The Modifier class provides {@code static} methods and
34 * constants to decode class and member access modifiers. The sets of
35 * modifiers are represented as integers with distinct bit positions
36 * representing different modifiers. The values for the constants
37 * representing the modifiers are taken from the tables in sections 4.1, 4.4, 4.5, and 4.7 of
38 * <cite>The Java™ Virtual Machine Specification</cite>.
39 *
40 * @see Class#getModifiers()
41 * @see Member#getModifiers()
42 *
43 * @author Nakul Saraiya
44 * @author Kenneth Russell
45 */
46 public class Modifier {
47
48 /*
49 * Bootstrapping protocol between java.lang and java.lang.reflect
50 * packages
51 */
52 static {
53 sun.reflect.ReflectionFactory factory =
54 AccessController.doPrivileged(
55 new ReflectionFactory.GetReflectionFactoryAction());
56 factory.setLangReflectAccess(new java.lang.reflect.ReflectAccess());
57 }
58
59 /**
60 * Return {@code true} if the integer argument includes the
61 * {@code public} modifier, {@code false} otherwise.
62 *
63 * @param mod a set of modifiers
64 * @return {@code true} if {@code mod} includes the
65 * {@code public} modifier; {@code false} otherwise.
66 */
|