< prev index next >

src/java.base/share/classes/java/lang/reflect/Modifier.java

Print this page

310      * modifier.
311      */
312     public static final int INTERFACE        = 0x00000200;
313 
314     /**
315      * The {@code int} value representing the {@code abstract}
316      * modifier.
317      */
318     public static final int ABSTRACT         = 0x00000400;
319 
320     /**
321      * The {@code int} value representing the {@code strictfp}
322      * modifier.
323      */
324     public static final int STRICT           = 0x00000800;
325 
326     // Bits not (yet) exposed in the public API either because they
327     // have different meanings for fields and methods and there is no
328     // way to distinguish between the two in this class, or because
329     // they are not Java programming language keywords
330     static final int BRIDGE    = 0x00000040;
331     static final int VARARGS   = 0x00000080;
332     static final int SYNTHETIC = 0x00001000;
333     static final int ANNOTATION  = 0x00002000;
334     static final int ENUM      = 0x00004000;
335     static final int MANDATED  = 0x00008000;

336     static boolean isSynthetic(int mod) {
337       return (mod & SYNTHETIC) != 0;
338     }
339 
340     static boolean isMandated(int mod) {
341       return (mod & MANDATED) != 0;
342     }
343 
344     // Note on the FOO_MODIFIERS fields and fooModifiers() methods:
345     // the sets of modifiers are not guaranteed to be constants
346     // across time and Java SE releases. Therefore, it would not be
347     // appropriate to expose an external interface to this information
348     // that would allow the values to be treated as Java-level
349     // constants since the values could be constant folded and updates
350     // to the sets of modifiers missed. Thus, the fooModifiers()
351     // methods return an unchanging values for a given release, but a
352     // value that can potentially change over time.
353 
354     /**
355      * The Java source modifiers that can be applied to a class.

310      * modifier.
311      */
312     public static final int INTERFACE        = 0x00000200;
313 
314     /**
315      * The {@code int} value representing the {@code abstract}
316      * modifier.
317      */
318     public static final int ABSTRACT         = 0x00000400;
319 
320     /**
321      * The {@code int} value representing the {@code strictfp}
322      * modifier.
323      */
324     public static final int STRICT           = 0x00000800;
325 
326     // Bits not (yet) exposed in the public API either because they
327     // have different meanings for fields and methods and there is no
328     // way to distinguish between the two in this class, or because
329     // they are not Java programming language keywords
330     static final int BRIDGE      = 0x00000040;
331     static final int VARARGS     = 0x00000080;
332     static final int SYNTHETIC   = 0x00001000;
333     static final int ANNOTATION  = 0x00002000;
334     static final int ENUM        = 0x00004000;
335     static final int MANDATED    = 0x00008000;
336     static final int FLATTENED   = 0x00008000;      // HotSpot-specific bit
337     static boolean isSynthetic(int mod) {
338       return (mod & SYNTHETIC) != 0;
339     }
340 
341     static boolean isMandated(int mod) {
342       return (mod & MANDATED) != 0;
343     }
344 
345     // Note on the FOO_MODIFIERS fields and fooModifiers() methods:
346     // the sets of modifiers are not guaranteed to be constants
347     // across time and Java SE releases. Therefore, it would not be
348     // appropriate to expose an external interface to this information
349     // that would allow the values to be treated as Java-level
350     // constants since the values could be constant folded and updates
351     // to the sets of modifiers missed. Thus, the fooModifiers()
352     // methods return an unchanging values for a given release, but a
353     // value that can potentially change over time.
354 
355     /**
356      * The Java source modifiers that can be applied to a class.
< prev index next >