⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modifier.java

📁 一个开源的JAVA虚拟机
💻 JAVA
字号:
/*    libaegisvm - The Aegis Virtual Machine for executing Java bytecode    Copyright (C) 2001-2002  Philip W. L. Fong    This library is free software; you can redistribute it and/or    modify it under the terms of the GNU Lesser General Public    License as published by the Free Software Foundation; either    version 2.1 of the License, or (at your option) any later version.    This library is distributed in the hope that it will be useful,    but WITHOUT ANY WARRANTY; without even the implied warranty of    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU    Lesser General Public License for more details.    You should have received a copy of the GNU Lesser General Public    License along with this library; if not, write to the Free Software    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*/package java.lang.reflect;public class Modifier {    public static final int PUBLIC       = 0x0001;    public static final int PRIVATE      = 0x0002;    public static final int PROTECTED    = 0x0004;    public static final int STATIC       = 0x0008;    public static final int FINAL        = 0x0010;    public static final int SYNCHRONIZED = 0x0020;    public static final int VOLATILE     = 0x0040;    public static final int TRANSIENT    = 0x0080;    public static final int NATIVE       = 0x0100;    public static final int INTERFACE    = 0x0200;    public static final int ABSTRACT     = 0x0400;    public static final int STRICT       = 0x0800;    public Modifier() { }    public static boolean isPublic(int mod) {	return (mod & PUBLIC) != 0;    }    public static boolean isPrivate(int mod) {	return (mod & PRIVATE) != 0;    }    public static boolean isProtected(int mod) {	return (mod & PROTECTED) != 0;    }    public static boolean isStatic(int mod) {	return (mod & STATIC) != 0;    }    public static boolean isFinal(int mod) {	return (mod & FINAL) != 0;    }    public static boolean isSynchronized(int mod) {	return (mod & SYNCHRONIZED) != 0;    }    public static boolean isVolatile(int mod) {	return (mod & VOLATILE) != 0;    }    public static boolean isTransient(int mod) {	return (mod & TRANSIENT) != 0;    }    public static boolean isNative(int mod) {	return (mod & NATIVE) != 0;    }    public static boolean isInterface(int mod) {	return (mod & INTERFACE) != 0;    }    public static boolean isAbstract(int mod) {	return (mod & ABSTRACT) != 0;    }    public static boolean isStrict(int mod) {	return (mod & STRICT) != 0;    }    public static String toString(int mod) {	String modifier = "";	if (isPublic(mod))	    modifier += "public ";	if (isProtected(mod))	    modifier += "protected ";	if (isPrivate(mod))	    modifier += "private ";	if (isAbstract(mod))	    modifier += "abstract ";	if (isStatic(mod))	    modifier += "static ";	if (isFinal(mod))	    modifier += "final ";	if (isTransient(mod))	    modifier += "transient ";	if (isVolatile(mod))	    modifier += "volatile ";	if (isSynchronized(mod))	    modifier += "synchronized ";	if (isNative(mod))	    modifier += "native ";	if (isStrict(mod))	    modifier += "strictfp ";	if (isInterface(mod))	    modifier += "interface ";	return modifier;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -