2362N/A * Copyright (c) 1996, 2008, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * The Modifier class provides {@code static} methods and 0N/A * constants to decode class and member access modifiers. The sets of 0N/A * modifiers are represented as integers with distinct bit positions 0N/A * representing different modifiers. The values for the constants 4008N/A * representing the modifiers are taken from the tables in sections 4.1, 4.4, 4.5, and 4.7 of 4008N/A * <cite>The Java™ Virtual Machine Specification</cite>. 0N/A * @see Class#getModifiers() 0N/A * @see Member#getModifiers() 0N/A * @author Nakul Saraiya 0N/A * @author Kenneth Russell 0N/A * Bootstrapping protocol between java.lang and java.lang.reflect 0N/A * Return {@code true} if the integer argument includes the 0N/A * {@code public} modifier, {@code false} otherwise. 0N/A * @param mod a set of modifiers 0N/A * @return {@code true} if {@code mod} includes the 0N/A * {@code public} modifier; {@code false} otherwise. 0N/A * Return {@code true} if the integer argument includes the 0N/A * {@code private} modifier, {@code false} otherwise. 0N/A * @param mod a set of modifiers 0N/A * @return {@code true} if {@code mod} includes the 0N/A * {@code private} modifier; {@code false} otherwise. 0N/A * Return {@code true} if the integer argument includes the 0N/A * {@code protected} modifier, {@code false} otherwise. 0N/A * @param mod a set of modifiers 0N/A * @return {@code true} if {@code mod} includes the 0N/A * {@code protected} modifier; {@code false} otherwise. 0N/A * Return {@code true} if the integer argument includes the 0N/A * {@code static} modifier, {@code false} otherwise. 0N/A * @param mod a set of modifiers 0N/A * @return {@code true} if {@code mod} includes the 0N/A * {@code static} modifier; {@code false} otherwise. 0N/A * Return {@code true} if the integer argument includes the 0N/A * {@code final} modifier, {@code false} otherwise. 0N/A * @param mod a set of modifiers 0N/A * @return {@code true} if {@code mod} includes the 0N/A * {@code final} modifier; {@code false} otherwise. 0N/A * Return {@code true} if the integer argument includes the 0N/A * {@code synchronized} modifier, {@code false} otherwise. 0N/A * @param mod a set of modifiers 0N/A * @return {@code true} if {@code mod} includes the 0N/A * {@code synchronized} modifier; {@code false} otherwise. 0N/A * Return {@code true} if the integer argument includes the 0N/A * {@code volatile} modifier, {@code false} otherwise. 0N/A * @param mod a set of modifiers 0N/A * @return {@code true} if {@code mod} includes the 0N/A * {@code volatile} modifier; {@code false} otherwise. 0N/A * Return {@code true} if the integer argument includes the 0N/A * {@code transient} modifier, {@code false} otherwise. 0N/A * @param mod a set of modifiers 0N/A * @return {@code true} if {@code mod} includes the 0N/A * {@code transient} modifier; {@code false} otherwise. 0N/A * Return {@code true} if the integer argument includes the 0N/A * {@code native} modifier, {@code false} otherwise. 0N/A * @param mod a set of modifiers 0N/A * @return {@code true} if {@code mod} includes the 0N/A * {@code native} modifier; {@code false} otherwise. 0N/A * Return {@code true} if the integer argument includes the 0N/A * {@code interface} modifier, {@code false} otherwise. 0N/A * @param mod a set of modifiers 0N/A * @return {@code true} if {@code mod} includes the 0N/A * {@code interface} modifier; {@code false} otherwise. 0N/A * Return {@code true} if the integer argument includes the 0N/A * {@code abstract} modifier, {@code false} otherwise. 0N/A * @param mod a set of modifiers 0N/A * @return {@code true} if {@code mod} includes the 0N/A * {@code abstract} modifier; {@code false} otherwise. 0N/A * Return {@code true} if the integer argument includes the 0N/A * {@code strictfp} modifier, {@code false} otherwise. 0N/A * @param mod a set of modifiers 0N/A * @return {@code true} if {@code mod} includes the 0N/A * {@code strictfp} modifier; {@code false} otherwise. 0N/A * Return a string describing the access modifier flags in 0N/A * the specified modifier. For example: 0N/A * public final synchronized strictfp 0N/A * </pre></blockquote> 0N/A * The modifier names are returned in an order consistent with the 4008N/A * suggested modifier orderings given in sections 8.1.1, 8.3.1, 8.4.3, 8.8.3, and 9.1.1 of 4008N/A * <cite>The Java™ Language Specification</cite>. 0N/A * The full modifier ordering used by this method is: 0N/A * <blockquote> {@code 0N/A * public protected private abstract static final transient 0N/A * volatile synchronized native strictfp 0N/A * interface } </blockquote> 0N/A * The {@code interface} modifier discussed in this class is 0N/A * not a true modifier in the Java language and it appears after 0N/A * all other modifiers listed by this method. This method may 0N/A * return a string of modifiers that are not valid modifiers of a 0N/A * Java entity; in other words, no checking is done on the 0N/A * possible validity of the combination of modifiers represented 1600N/A * Note that to perform such checking for a known kind of entity, 1600N/A * such as a constructor or method, first AND the argument of 1600N/A * {@code toString} with the appropriate mask from a method like 1600N/A * {@link #constructorModifiers} or {@link #methodModifiers}. 0N/A * @param mod a set of modifiers 0N/A * @return a string representation of the set of modifiers 0N/A * represented by {@code mod} 0N/A /* Canonical order */ 4008N/A * Access modifier flag constants from tables 4.1, 4.4, 4.5, and 4.7 of 4008N/A * <cite>The Java™ Virtual Machine Specification</cite> 0N/A * The {@code int} value representing the {@code public} 0N/A * The {@code int} value representing the {@code private} 0N/A * The {@code int} value representing the {@code protected} 0N/A * The {@code int} value representing the {@code static} 0N/A * The {@code int} value representing the {@code final} 0N/A public static final int FINAL =
0x00000010;
0N/A * The {@code int} value representing the {@code synchronized} 0N/A * The {@code int} value representing the {@code volatile} 0N/A * The {@code int} value representing the {@code transient} 0N/A * The {@code int} value representing the {@code native} 0N/A * The {@code int} value representing the {@code interface} 0N/A * The {@code int} value representing the {@code abstract} 0N/A * The {@code int} value representing the {@code strictfp} 0N/A // Bits not (yet) exposed in the public API either because they 0N/A // have different meanings for fields and methods and there is no 0N/A // way to distinguish between the two in this class, or because 0N/A // they are not Java programming language keywords 0N/A static final int ENUM =
0x00004000;
1600N/A * Return an {@code int} value OR-ing together the source language 1600N/A * modifiers that can be applied to a class. 1600N/A * @return an {@code int} value OR-ing together the source language 1600N/A * modifiers that can be applied to a class. 4008N/A * @jls 8.1.1 Class Modifiers 1600N/A * Return an {@code int} value OR-ing together the source language 1600N/A * modifiers that can be applied to an interface. 1600N/A * @return an {@code int} value OR-ing together the source language 1600N/A * modifiers that can be applied to an inteface. 4008N/A * @jls 9.1.1 Interface Modifiers 1600N/A * Return an {@code int} value OR-ing together the source language 1600N/A * modifiers that can be applied to a constructor. 1600N/A * @return an {@code int} value OR-ing together the source language 1600N/A * modifiers that can be applied to a constructor. 4008N/A * @jls 8.8.3 Constructor Modifiers 1600N/A * Return an {@code int} value OR-ing together the source language 1600N/A * modifiers that can be applied to a method. 1600N/A * @return an {@code int} value OR-ing together the source language 1600N/A * modifiers that can be applied to a method. 4008N/A * @jls 8.4.3 Method Modifiers 1600N/A * Return an {@code int} value OR-ing together the source language 1600N/A * modifiers that can be applied to a field. 1600N/A * @return an {@code int} value OR-ing together the source language 1600N/A * modifiers that can be applied to a field. 4008N/A * @jls 8.3.1 Field Modifiers