Class Pass3bVerifier.InstructionContextQueue
java.lang.Object
org.apache.bcel.verifier.structurals.Pass3bVerifier.InstructionContextQueue
- Enclosing class:
Pass3bVerifier
An InstructionContextQueue is a utility class that holds (InstructionContext, ArrayList) pairs in a Queue data
structure. This is used to hold information about InstructionContext objects externally --- i.e. that information is
not saved inside the InstructionContext object itself. This is useful to save the execution path of the symbolic
execution of the Pass3bVerifier - this is not information that belongs into the InstructionContext object itself.
Only at "execute()"ing time, an InstructionContext object will get the current information we have about its symbolic
execution predecessors.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<ArrayList<InstructionContext>> The second elements from pairs in the queue.private final List
<InstructionContext> The first elements from pairs in the queue. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(InstructionContext ic, ArrayList<InstructionContext> executionChain) Adds an (InstructionContext, ExecutionChain) pair to this queue.getEC
(int i) Gets a specific ExecutionChain from the queue.getIC
(int i) Gets a specific InstructionContext from the queue.boolean
isEmpty()
Tests if InstructionContext queue is empty.void
remove
(int i) Removes a specific (InstructionContext, ExecutionChain) pair from their respective queues.int
size()
Gets the size of the InstructionContext queue.
-
Field Details
-
ics
The first elements from pairs in the queue. -
ecs
The second elements from pairs in the queue.
-
-
Constructor Details
-
InstructionContextQueue
private InstructionContextQueue()
-
-
Method Details
-
add
Adds an (InstructionContext, ExecutionChain) pair to this queue.- Parameters:
ic
- the InstructionContextexecutionChain
- the ExecutionChain
-
getEC
Gets a specific ExecutionChain from the queue.- Parameters:
i
- the index of the item to be fetched- Returns:
- the indicated ExecutionChain
-
getIC
Gets a specific InstructionContext from the queue.- Parameters:
i
- the index of the item to be fetched- Returns:
- the indicated InstructionContext
-
isEmpty
public boolean isEmpty()Tests if InstructionContext queue is empty.- Returns:
- true if the InstructionContext queue is empty.
-
remove
public void remove(int i) Removes a specific (InstructionContext, ExecutionChain) pair from their respective queues.- Parameters:
i
- the index of the items to be removed
-
size
public int size()Gets the size of the InstructionContext queue.- Returns:
- the size of the InstructionQueue
-