Class AbstractBinopExpr

java.lang.Object
sootup.core.jimple.common.expr.AbstractBinopExpr
All Implemented Interfaces:
EquivTo, Expr, Value, JimpleIR, Acceptor<ExprVisitor>
Direct Known Subclasses:
AbstractFloatBinopExpr, AbstractIntBinopExpr, AbstractIntLongBinopExpr

public abstract class AbstractBinopExpr extends Object implements Expr
Abstract base class for binary operator expressions.
  • Method Details

    • getOp1

      public @NonNull Immediate getOp1()
      Returns the left operand of this binary expression.
    • getOp2

      public @NonNull Immediate getOp2()
      Returns the right operand of this binary expression.
    • collectUses

      public void collectUses(List<Value> collector)
      Description copied from interface: Value
      Collects all values used by this value into the given list.
      Specified by:
      collectUses in interface Value
    • equivTo

      public boolean equivTo(@NonNull Object o, @NonNull JimpleComparator comparator)
      Description copied from interface: EquivTo
      Returns true if this object is equivalent to o according to the given comparator.
      Specified by:
      equivTo in interface EquivTo
      Parameters:
      o - the object to compare with
      comparator - the comparator defining the equivalence relation
      Returns:
      true if this object is structurally equivalent to o under the given comparator
    • equivHashCode

      public int equivHashCode()
      Returns a hash code for this object, consistent with structural equality.
      Specified by:
      equivHashCode in interface EquivTo
      Returns:
      a structural hash code consistent with equivTo
    • getSymbol

      public abstract @NonNull String getSymbol()
      Returns the unique symbol for an operator.
      Returns:
      the operator symbol string (e.g., "+", "-")
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toString

      public void toString(@NonNull StmtPrinter up)
      Description copied from interface: Value
      Appends a string representation of this value to the given printer.
      Specified by:
      toString in interface Value
    • withOp1

      public abstract @NonNull AbstractBinopExpr withOp1(@NonNull Immediate value)
      Returns a copy of this expression with the left operand replaced.
    • withOp2

      public abstract @NonNull AbstractBinopExpr withOp2(@NonNull Immediate value)
      Returns a copy of this expression with the right operand replaced.