Package japicmp.model
Enum AccessModifier
- java.lang.Object
-
- java.lang.Enum<AccessModifier>
-
- japicmp.model.AccessModifier
-
- All Implemented Interfaces:
JApiModifierBase
,java.io.Serializable
,java.lang.Comparable<AccessModifier>
public enum AccessModifier extends java.lang.Enum<AccessModifier> implements JApiModifierBase
Represents the access modifiers as defined in the Java Language Specification.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description PACKAGE_PROTECTED
PRIVATE
PROTECTED
PUBLIC
-
Field Summary
Fields Modifier and Type Field Description private int
level
-
Constructor Summary
Constructors Modifier Constructor Description private
AccessModifier(int level)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLevel()
static java.lang.String
listOfAccessModifier()
static Optional<AccessModifier>
toModifier(java.lang.String accessModifierArg)
static AccessModifier
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static AccessModifier[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PUBLIC
public static final AccessModifier PUBLIC
-
PROTECTED
public static final AccessModifier PROTECTED
-
PACKAGE_PROTECTED
public static final AccessModifier PACKAGE_PROTECTED
-
PRIVATE
public static final AccessModifier PRIVATE
-
-
Method Detail
-
values
public static AccessModifier[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AccessModifier c : AccessModifier.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AccessModifier valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getLevel
public int getLevel()
-
listOfAccessModifier
public static java.lang.String listOfAccessModifier()
-
toModifier
public static Optional<AccessModifier> toModifier(java.lang.String accessModifierArg)
-
-