Class InstructionArray
java.lang.Object
com.ibm.wala.dalvik.classLoader.InstructionArray
- All Implemented Interfaces:
Iterable<Instruction>, Collection<Instruction>
Collection of
Instruction which allows getting an instruction from its table index id or
from its bytecode index. Removing an element is not allowed.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(Instruction e) booleanaddAll(Collection<? extends Instruction> c) voidclear()booleanbooleancontainsAll(Collection<?> c) booleangetFromId(int id) getFromPc(int pc) intgetIndexFromPc(int pc) intgetPcFromIndex(int index) inthashCode()intbooleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()Object[]toArray()<T> T[]toArray(T[] a) Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Collection
parallelStream, removeIf, spliterator, stream, toArray
-
Constructor Details
-
InstructionArray
public InstructionArray()
-
-
Method Details
-
add
- Specified by:
addin interfaceCollection<Instruction>
-
addAll
- Specified by:
addAllin interfaceCollection<Instruction>
-
contains
- Specified by:
containsin interfaceCollection<Instruction>
-
containsAll
- Specified by:
containsAllin interfaceCollection<Instruction>
-
equals
- Specified by:
equalsin interfaceCollection<Instruction>- Overrides:
equalsin classObject
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<Instruction>- Overrides:
hashCodein classObject
-
indexOf
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<Instruction>
-
iterator
- Specified by:
iteratorin interfaceCollection<Instruction>- Specified by:
iteratorin interfaceIterable<Instruction>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<Instruction>
-
remove
- Specified by:
removein interfaceCollection<Instruction>
-
removeAll
- Specified by:
removeAllin interfaceCollection<Instruction>
-
retainAll
- Specified by:
retainAllin interfaceCollection<Instruction>
-
size
public int size()- Specified by:
sizein interfaceCollection<Instruction>
-
toArray
- Specified by:
toArrayin interfaceCollection<Instruction>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<Instruction>
-
getIndexFromPc
public int getIndexFromPc(int pc) - Parameters:
pc- the byte code index.- Returns:
- The index of the instruction of given byte code index
-
getPcFromIndex
public int getPcFromIndex(int index) - Parameters:
index- the instruction index.- Returns:
- The byte code address of the instruction index
-
getFromId
- Returns:
- The instruction from its id.
-
getFromPc
- Returns:
- The instruction from its pc.
-