Interface Constant

All Superinterfaces:
Acceptor<ConstantVisitor>, EquivTo, Immediate, JimpleIR, Value
All Known Subinterfaces:
ComparableConstant<C>, LogicalConstant<L>, NumericConstant<N>, RealConstant<R>, ShiftableConstant<A>
All Known Implementing Classes:
BooleanConstant, ClassConstant, DoubleConstant, EnumConstant, FloatConstant, IntConstant, LongConstant, MethodHandle, MethodType, NullConstant, StringConstant

public interface Constant extends Immediate, Acceptor<ConstantVisitor>
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    collectUses(List<Value> collector)
    Collects all values used by this value into the given list.
    default int
    Returns a hash code consistent with structural equality for this object.
    default boolean
    equivTo(Object o, @NonNull JimpleComparator comparator)
    Returns true if this object is equivalent to o according to the given comparator.
    default void
    toString(@NonNull StmtPrinter up)
    Appends a string representation of this value to the given printer.

    Methods inherited from interface sootup.core.jimple.visitor.Acceptor

    accept

    Methods inherited from interface sootup.core.jimple.basic.EquivTo

    equivTo

    Methods inherited from interface sootup.core.jimple.common.Value

    accept, getType, getUses
  • Method Details

    • collectUses

      default 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

      default boolean equivTo(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

      default int equivHashCode()
      Returns a hash code consistent with structural equality for this object. For Constants, equality is structural equality; we hope that each subclass defines hashCode() correctly.
      Specified by:
      equivHashCode in interface EquivTo
      Returns:
      a structural hash code consistent with equivTo
    • toString

      default 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