Class Evaluator

java.lang.Object
sootup.interceptors.Evaluator

public class Evaluator extends Object
Evaluates, whether a value is constant and computes its constant value, if possible.
Author:
Marcus Nachtigall
  • Constructor Details

    • Evaluator

      public Evaluator()
  • Method Details

    • isConstantValue

      public static boolean isConstantValue(Value op)
      Checks whether the value of op is constant
      Parameters:
      op - The value to be evaluated
      Returns:
      True, if op is constant. Otherwise, false.
    • getConstantValueOf

      @Nullable public static Constant getConstantValueOf(Value op)
      Returns the constant value of op, if it is easy to find the constant value; else returns null.
      Parameters:
      op - The value to be evaluated
      Returns:
      The resulting constant or null