Enum Class Constant.Condition
- All Implemented Interfaces:
Serializable,Comparable<Constant.Condition>,Constable
- Enclosing class:
Constant
Available options for the
Constant.expandZeroConditions() setting.
Each option matches the inverse instructions as well because in the
compiled code it is not unusual for if (x > 0) to be compiled
as if (!(x <= 0))
Note that all of these options assume that x is on the left-hand side of the expression in question. For expressions where zero is on the right-hand side you should choose the inverse.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMatch >= operators and < instructions, equivalent toLESS_THAN_ZEROx >= 0Match > operators and <= instructions, equivalent toLESS_THAN_OR_EQUAL_TO_ZEROx > 0Match <= operators and > instructionsx <= 0Match < operators and >= instructions:x < 0 -
Method Summary
Modifier and TypeMethodDescriptionGet the condition which is equivalent to this conditionint[]Get the opcodes for this conditionstatic Constant.ConditionReturns the enum constant of this class with the specified name.static Constant.Condition[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LESS_THAN_ZERO
Match < operators and >= instructions:x < 0 -
LESS_THAN_OR_EQUAL_TO_ZERO
Match <= operators and > instructionsx <= 0 -
GREATER_THAN_OR_EQUAL_TO_ZERO
Match >= operators and < instructions, equivalent toLESS_THAN_ZEROx >= 0 -
GREATER_THAN_ZERO
Match > operators and <= instructions, equivalent toLESS_THAN_OR_EQUAL_TO_ZEROx > 0
-
-
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
-
getEquivalentCondition
Get the condition which is equivalent to this condition -
getOpcodes
public int[] getOpcodes()Get the opcodes for this condition
-