Class JArrayRef

java.lang.Object
sootup.core.jimple.common.ref.JArrayRef
All Implemented Interfaces:
EquivTo, LValue, ConcreteRef, Ref, Value, JimpleIR, Acceptor<RefVisitor>

public final class JArrayRef extends Object implements ConcreteRef, LValue
  • Constructor Details

    • JArrayRef

      public JArrayRef(@NonNull Local base, @NonNull Immediate index)
  • Method Details

    • equivTo

      public 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

      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
    • 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
    • getBase

      public @NonNull Local getBase()
    • getIndex

      public @NonNull Immediate getIndex()
    • getUses

      public @NonNull List<Value> getUses()
      Description copied from interface: Value
      Returns a List of Locals, FieldRefs, ArrayRefs which are used by (i.e. contained within) this Expression or Reference.
      Specified by:
      getUses in interface Value
      Returns:
      the list of values used by this value
    • 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
    • getType

      public @NonNull Type getType()
      Description copied from interface: Value
      Returns the Soot type of this Value.
      Specified by:
      getType in interface Value
      Returns:
      the type of this value
    • accept

      public <V extends RefVisitor> V accept(@NonNull V v)
      Description copied from interface: Acceptor
      Called when this object is visited.
      Specified by:
      accept in interface Acceptor<RefVisitor>
      Type Parameters:
      V - the concrete visitor type
      Parameters:
      v - the visitor processing this object
      Returns:
      the visitor after processing
    • withBase

      public @NonNull JArrayRef withBase(@NonNull Local base)
    • withIndex

      public @NonNull JArrayRef withIndex(@NonNull Immediate index)