Package org.spongepowered.asm.util
Enum Class Bytecode.Visibility
- All Implemented Interfaces:
Serializable,Comparable<Bytecode.Visibility>,Constable
- Enclosing class:
Bytecode
Ordinal member visibility level. This is used to represent visibility of
a member in a formal way from lowest to highest. The
Bytecode.getVisibility(org.objectweb.asm.tree.MethodNode) methods can be used to convert access
flags to this enum. The value returned from Enum.ordinal can then be
used to determine whether a visibility level is higher or lower
than any other given visibility level.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionbooleanisAtLeast(Bytecode.Visibility other) Get whether this visibility level represents a level which is the same or greater than the supplied levelbooleanisLessThan(Bytecode.Visibility other) Get whether this visibility level represents a level which less than the supplied levelstatic Bytecode.VisibilityReturns the enum constant of this class with the specified name.static Bytecode.Visibility[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PRIVATE
Members decorated withOpcodes.ACC_PRIVATE -
PROTECTED
Members decorated withOpcodes.ACC_PROTECTED -
PACKAGE
Members not decorated with any access flags -
PUBLIC
Members decorated withOpcodes.ACC_PUBLIC
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
isAtLeast
Get whether this visibility level represents a level which is the same or greater than the supplied level- Parameters:
other- level to compare to- Returns:
- true if greater or equal
-
isLessThan
Get whether this visibility level represents a level which less than the supplied level- Parameters:
other- level to compare to- Returns:
- true if greater or equal
-