Class InstructionArray
java.lang.Object
com.ibm.wala.dalvik.classLoader.InstructionArray
- All Implemented Interfaces:
Iterable<Instruction>
,Collection<Instruction>
Collection of Instruction wich allow to get an instruction from its table index id or from its
bytecode index. It's not allowed to remove an element.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(Instruction e) boolean
addAll
(Collection<? extends Instruction> c) void
clear()
boolean
boolean
containsAll
(Collection<?> c) boolean
getFromId
(int id) getFromPc
(int pc) int
getIndexFromPc
(int pc) int
getPcFromIndex
(int index) int
hashCode()
int
boolean
isEmpty()
iterator()
boolean
boolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) int
size()
Object[]
toArray()
<T> T[]
toArray
(T[] a) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
Constructor Details
-
InstructionArray
public InstructionArray()
-
-
Method Details
-
add
- Specified by:
add
in interfaceCollection<Instruction>
-
addAll
- Specified by:
addAll
in interfaceCollection<Instruction>
-
contains
- Specified by:
contains
in interfaceCollection<Instruction>
-
containsAll
- Specified by:
containsAll
in interfaceCollection<Instruction>
-
equals
- Specified by:
equals
in interfaceCollection<Instruction>
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceCollection<Instruction>
- Overrides:
hashCode
in classObject
-
indexOf
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<Instruction>
-
iterator
- Specified by:
iterator
in interfaceCollection<Instruction>
- Specified by:
iterator
in interfaceIterable<Instruction>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<Instruction>
-
remove
- Specified by:
remove
in interfaceCollection<Instruction>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<Instruction>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<Instruction>
-
size
public int size()- Specified by:
size
in interfaceCollection<Instruction>
-
toArray
- Specified by:
toArray
in interfaceCollection<Instruction>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArray
in 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.
-