public class JvmStackLocation extends JvmMemoryLocation
JvmStackLocation is a memory location at the operand stack. Indexing starts from the
top of the stack.| Modifier and Type | Field and Description |
|---|---|
int |
index |
| Constructor and Description |
|---|
JvmStackLocation(int index)
Create a stack location.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
<T extends AbstractState<T>> |
extractValueOrDefault(JvmAbstractState<T> jvmState,
T defaultValue)
Given a JVM state, extract its content in the position represented by this
JvmMemoryLocation. |
int |
getIndex()
Returns the stack index from the top.
|
int |
hashCode() |
java.lang.String |
toString() |
public JvmStackLocation(int index)
index - a stack element index from the toppublic <T extends AbstractState<T>> T extractValueOrDefault(JvmAbstractState<T> jvmState, T defaultValue)
JvmMemoryLocationJvmMemoryLocation.extractValueOrDefault in class JvmMemoryLocationT - The type of the states contained in the JVM state. e.g., for taint analysis this
would be a SetAbstractState containing the taints
and for value analysis a ValueAbstractState.jvmState - The state from which the value is extracted.defaultValue - The value returned if it's not possible to extract the value.public int getIndex()
public boolean equals(java.lang.Object obj)
equals in class JvmMemoryLocationpublic int hashCode()
hashCode in class JvmMemoryLocationpublic java.lang.String toString()
toString in class JvmMemoryLocation