Class JLengthExpr

java.lang.Object
sootup.core.jimple.common.expr.AbstractUnopExpr
sootup.core.jimple.common.expr.JLengthExpr
All Implemented Interfaces:
EquivTo, Expr, Value, JimpleIR, Acceptor<ExprVisitor>

public final class JLengthExpr extends AbstractUnopExpr
An expression that returns the length of an array.
  • Constructor Details

    • JLengthExpr

      public JLengthExpr(@NonNull Immediate op)
  • 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.
      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.
      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.
    • getType

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

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

      public @NonNull JLengthExpr withOp(@NonNull Immediate op)
    • isJLengthExpr

      public boolean isJLengthExpr()
    • asJLengthExpr

      public JLengthExpr asJLengthExpr()
    • toJLengthExpr

      public Optional<JLengthExpr> toJLengthExpr()