public static enum ModifierUtil.ModifierType extends Enum<ModifierUtil.ModifierType>
Enum Constant and Description |
---|
ABSTRACT
abstract,将一个类声明为抽象类,没有实现的方法,需要子类提供方法实现。
|
FINAL
final修饰符,最终修饰符,指定此变量的值不能变,使用在方法上表示不能被重载
|
NATIVE
native,本地修饰符。
|
PRIVATE
private修饰符,只能被自己访问和修改
|
PROTECTED
protected修饰符,自身、子类及同一个包中类可以访问
|
PUBLIC
public修饰符,所有类都能访问
|
STATIC
static修饰符,(静态修饰符)指定变量被所有对象共享,即所有实例都可以使用该变量。
|
STRICT
strictfp,一旦使用了关键字strictfp来声明某个类、接口或者方法时,那么在这个关键字所声明的范围内所有浮点运算都是精确的,符合IEEE-754规范的。
|
SYNCHRONIZED
synchronized,同步修饰符,在多个线程中,该修饰符用于在运行前,对他所属的方法加锁,以防止其他线程的访问,运行结束后解锁。
|
TRANSIENT
(过度修饰符)指定该变量是系统保留,暂无特别作用的临时性变量,序列化时忽略
|
VOLATILE
(易失修饰符)指定该变量可以同时被几个线程控制和修改
|
Modifier and Type | Method and Description |
---|---|
int |
getValue()
获取修饰符枚举对应的int修饰符值,值见
Modifier |
static ModifierUtil.ModifierType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ModifierUtil.ModifierType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ModifierUtil.ModifierType PUBLIC
public static final ModifierUtil.ModifierType PRIVATE
public static final ModifierUtil.ModifierType PROTECTED
public static final ModifierUtil.ModifierType STATIC
public static final ModifierUtil.ModifierType FINAL
public static final ModifierUtil.ModifierType SYNCHRONIZED
public static final ModifierUtil.ModifierType VOLATILE
public static final ModifierUtil.ModifierType TRANSIENT
public static final ModifierUtil.ModifierType NATIVE
public static final ModifierUtil.ModifierType ABSTRACT
public static final ModifierUtil.ModifierType STRICT
public static ModifierUtil.ModifierType[] values()
for (ModifierUtil.ModifierType c : ModifierUtil.ModifierType.values()) System.out.println(c);
public static ModifierUtil.ModifierType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getValue()
Modifier
Copyright © 2025. All rights reserved.