9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package sun.tools.util; 27 28 import sun.tools.java.*; 29 30 31 /** 32 * A class whose instances are filters over Modifier bits. 33 * Filtering is done by returning boolean values. 34 * Classes, methods and fields can be filtered, or filtering 35 * can be done directly on modifier bits. 36 * 37 * WARNING: The contents of this source file are not part of any 38 * supported API. Code that depends on them does so at its own risk: 39 * they are subject to change or removal without notice. 40 * 41 * @see java.lang.reflect.Modifier 42 * @author Robert Field 43 */ 44 45 public 46 class ModifierFilter extends java.lang.reflect.Modifier { 47 48 /** 49 * Package private access. 50 * A "pseudo-" modifier bit that can be used in the 51 * constructors of this class to specify package private 52 * access. This is needed since there is no Modifier.PACKAGE. 53 */ 54 public static final long PACKAGE = 0x8000000000000000L; 55 56 /** 57 * All access modifiers. 58 * A short-hand set of modifier bits that can be used in the 59 * constructors of this class to specify all access modifiers, 60 * Same as PRIVATE | PROTECTED | PUBLIC | PACKAGE. 61 */ 62 public static final long ALL_ACCESS = 63 PRIVATE | PROTECTED | PUBLIC | PACKAGE; 64 65 private long oneOf; 66 private long must; | 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package sun.tools.util; 27 28 import sun.tools.java.*; 29 import static java.lang.reflect.Modifier.*; 30 31 /** 32 * A class whose instances are filters over Modifier bits. 33 * Filtering is done by returning boolean values. 34 * Classes, methods and fields can be filtered, or filtering 35 * can be done directly on modifier bits. 36 * 37 * WARNING: The contents of this source file are not part of any 38 * supported API. Code that depends on them does so at its own risk: 39 * they are subject to change or removal without notice. 40 * 41 * @see java.lang.reflect.Modifier 42 * @author Robert Field 43 */ 44 45 public 46 class ModifierFilter { 47 48 /** 49 * Package private access. 50 * A "pseudo-" modifier bit that can be used in the 51 * constructors of this class to specify package private 52 * access. This is needed since there is no Modifier.PACKAGE. 53 */ 54 public static final long PACKAGE = 0x8000000000000000L; 55 56 /** 57 * All access modifiers. 58 * A short-hand set of modifier bits that can be used in the 59 * constructors of this class to specify all access modifiers, 60 * Same as PRIVATE | PROTECTED | PUBLIC | PACKAGE. 61 */ 62 public static final long ALL_ACCESS = 63 PRIVATE | PROTECTED | PUBLIC | PACKAGE; 64 65 private long oneOf; 66 private long must; |