Class JvmMemoryLocation
- java.lang.Object
-
- proguard.analysis.cpa.jvm.witness.JvmMemoryLocation
-
- Direct Known Subclasses:
JvmHeapLocation
,JvmLocalVariableLocation
,JvmStackLocation
,JvmStaticFieldLocation
public abstract class JvmMemoryLocation extends java.lang.Object
AJvmMemoryLocation
points at a specific location in a certain state of the Jvm. For example aJvmStackLocation
with index 0 indicates the top of the stack.
-
-
Constructor Summary
Constructors Constructor Description JvmMemoryLocation()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract boolean
equals(java.lang.Object obj)
abstract <T extends LatticeAbstractState<T>>
TextractValueOrDefault(JvmAbstractState<T> jvmState, T defaultValue)
Given a JVM state, extract its content in the position represented by thisJvmMemoryLocation
.abstract int
hashCode()
abstract java.lang.String
toString()
-
-
-
Method Detail
-
extractValueOrDefault
public abstract <T extends LatticeAbstractState<T>> T extractValueOrDefault(JvmAbstractState<T> jvmState, T defaultValue)
Given a JVM state, extract its content in the position represented by thisJvmMemoryLocation
.- Type Parameters:
T
- The type of the states contained in the JVM state. e.g., for taint analysis this would be aSetAbstractState
containing the taints and for value analysis aValueAbstractState
.- Parameters:
jvmState
- The state from which the value is extracted.defaultValue
- The value returned if it's not possible to extract the value.- Returns:
- The value from the JVM abstract state for the memory location represented by this object. Or default value if not possible.
-
equals
public abstract boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public abstract int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public abstract java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-