Package com.ibm.wala.dalvik.classLoader
Class InstructionArray
- java.lang.Object
-
- com.ibm.wala.dalvik.classLoader.InstructionArray
-
- All Implemented Interfaces:
Iterable<Instruction>,Collection<Instruction>
public class InstructionArray extends Object implements 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
Constructors Constructor Description InstructionArray()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(Instruction e)booleanaddAll(Collection<? extends Instruction> c)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)booleanequals(Object o)InstructiongetFromId(int id)InstructiongetFromPc(int pc)intgetIndexFromPc(int pc)intgetPcFromIndex(int index)inthashCode()intindexOf(Object o)booleanisEmpty()Iterator<Instruction>iterator()booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)intsize()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
-
-
-
-
Method Detail
-
add
public boolean add(Instruction e)
- Specified by:
addin interfaceCollection<Instruction>
-
addAll
public boolean addAll(Collection<? extends Instruction> c)
- Specified by:
addAllin interfaceCollection<Instruction>
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<Instruction>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<Instruction>
-
equals
public boolean equals(Object o)
- Specified by:
equalsin interfaceCollection<Instruction>- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceCollection<Instruction>- Overrides:
hashCodein classObject
-
indexOf
public int indexOf(Object o)
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<Instruction>
-
iterator
public Iterator<Instruction> iterator()
- Specified by:
iteratorin interfaceCollection<Instruction>- Specified by:
iteratorin interfaceIterable<Instruction>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<Instruction>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<Instruction>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<Instruction>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAllin interfaceCollection<Instruction>
-
size
public int size()
- Specified by:
sizein interfaceCollection<Instruction>
-
toArray
public Object[] 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
public Instruction getFromId(int id)
- Parameters:
id-- Returns:
- The instruction from its id.
-
getFromPc
public Instruction getFromPc(int pc)
- Parameters:
pc-- Returns:
- The instruction from its pc.
-
-