soot.jimple.infoflow.collections.strategies.containers.shift.PreciseShift Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of soot-infoflow Show documentation
Show all versions of soot-infoflow Show documentation
Soot extending data flow tracking components for Java
The newest version!
package soot.jimple.infoflow.collections.strategies.containers.shift;
import soot.jimple.infoflow.collections.context.IntervalContext;
import soot.jimple.infoflow.data.ContainerContext;
public class PreciseShift implements IShiftOperation {
@Override
public ContainerContext shift(ContainerContext ctxt, int n, boolean exact) {
if (ctxt instanceof IntervalContext) {
IntervalContext shifted = ((IntervalContext) ctxt).exactShift(new IntervalContext(n));
return exact ? shifted : ((IntervalContext) ctxt).union(shifted);
}
throw new RuntimeException("Expect interval context but got: " + ctxt.getClass().getName());
}
}