proguard.analysis.cpa.jvm.util.HeapUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proguard-core Show documentation
Show all versions of proguard-core Show documentation
ProGuardCORE is a free library to read, analyze, modify, and write Java class files.
package proguard.analysis.cpa.jvm.util;
import proguard.analysis.cpa.defaults.SetAbstractState;
import proguard.analysis.cpa.jvm.domain.reference.Reference;
import proguard.analysis.cpa.jvm.domain.taint.JvmTaintTreeHeapFollowerAbstractState;
import proguard.analysis.cpa.jvm.witness.JvmStackLocation;
import proguard.classfile.util.ClassUtil;
/**
* A class with utility methods for the {@link
* proguard.analysis.cpa.jvm.state.heap.tree.JvmTreeHeapAbstractState}.
*
* @author Dmitry Ivanov
*/
public class HeapUtil {
/** Retrieves the argument reference from the principal state. */
public static SetAbstractState getArgumentReference(
JvmTaintTreeHeapFollowerAbstractState expandedHeap,
int parameterSize,
String fqn,
boolean isStatic,
int index) {
return expandedHeap.getReferenceAbstractState(
new JvmStackLocation(
parameterSize - ClassUtil.internalMethodVariableIndex(fqn, isStatic, index) - 1));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy