Package org.sonar.java.bytecode.se
Enum BytecodeEGWalker.StackValueCategoryConstraint
- java.lang.Object
-
- java.lang.Enum<BytecodeEGWalker.StackValueCategoryConstraint>
-
- org.sonar.java.bytecode.se.BytecodeEGWalker.StackValueCategoryConstraint
-
- All Implemented Interfaces:
Serializable,Comparable<BytecodeEGWalker.StackValueCategoryConstraint>,Constraint
- Enclosing class:
- BytecodeEGWalker
public static enum BytecodeEGWalker.StackValueCategoryConstraint extends Enum<BytecodeEGWalker.StackValueCategoryConstraint> implements Constraint
Because some instructions manipulate stack differently depending on the type of the value, we need this constraint to know category of the value see https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-2.html#jvms-2.11.1 Table 2.11.1-B
-
-
Enum Constant Summary
Enum Constants Enum Constant Description LONG_OR_DOUBLE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ConstraintcopyOver(RelationalSymbolicValue.Kind kind)Return constraint which should be applied to the rhs of the relation, if this constraint is set on the lhs of the relation.StringvalueAsString()static BytecodeEGWalker.StackValueCategoryConstraintvalueOf(String name)Returns the enum constant of this type with the specified name.static BytecodeEGWalker.StackValueCategoryConstraint[]values()Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface org.sonar.java.se.constraint.Constraint
hasPreciseValue, inverse, isValidWith
-
-
-
-
Enum Constant Detail
-
LONG_OR_DOUBLE
public static final BytecodeEGWalker.StackValueCategoryConstraint LONG_OR_DOUBLE
-
-
Method Detail
-
values
public static BytecodeEGWalker.StackValueCategoryConstraint[] 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 (BytecodeEGWalker.StackValueCategoryConstraint c : BytecodeEGWalker.StackValueCategoryConstraint.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BytecodeEGWalker.StackValueCategoryConstraint valueOf(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
valueAsString
public String valueAsString()
- Specified by:
valueAsStringin interfaceConstraint- Returns:
- String representation of value encoded by constraint for purpose of flow message
-
copyOver
@Nullable public Constraint copyOver(RelationalSymbolicValue.Kind kind)
Description copied from interface:ConstraintReturn constraint which should be applied to the rhs of the relation, if this constraint is set on the lhs of the relation.- Specified by:
copyOverin interfaceConstraint- Parameters:
kind- kind of relation over which constraint is copied- Returns:
- constraint to be set on rhs, null if no constraint should be set
-
-