final class InterfaceCollection extends java.lang.Object implements IInterfaceCollection
Modifier and Type | Field and Description |
---|---|
private IntVector |
m_interfaces |
Constructor and Description |
---|
InterfaceCollection(int capacity) |
Modifier and Type | Method and Description |
---|---|
void |
accept(IClassDefVisitor visitor,
java.lang.Object ctx) |
int |
add(int interface_index)
Appends a new superinterface pointer to the collection.
|
java.lang.Object |
clone()
Performs a deep copy.
|
int |
get(int offset)
Returns the
CONSTANT_Class_info
constant pool index for offset'th direct superinterface. |
int |
set(int offset,
int interface_index)
Replaces superinterface pointer number 'offset' with new value 'interface_index'.
|
int |
size()
Returns the number of direct superinterfaces for this class/interface.
|
void |
writeInClassFormat(UDataOutputStream out) |
private IntVector m_interfaces
public int get(int offset)
IInterfaceCollection
CONSTANT_Class_info
constant pool index for offset'th direct superinterface.get
in interface IInterfaceCollection
offset
- superinterface number [must be in [0, size()) range]public int size()
IInterfaceCollection
size
in interface IInterfaceCollection
public java.lang.Object clone()
clone
in interface IInterfaceCollection
clone
in class java.lang.Object
public void writeInClassFormat(UDataOutputStream out) throws java.io.IOException
writeInClassFormat
in interface IClassFormatOutput
java.io.IOException
public void accept(IClassDefVisitor visitor, java.lang.Object ctx)
accept
in interface IInterfaceCollection
public int add(int interface_index)
IInterfaceCollection
add
in interface IInterfaceCollection
interface_index
- constant pool index [must be positive; input not validated]IInterfaceCollection.size()
-1 when called
after this method]public int set(int offset, int interface_index)
IInterfaceCollection
set
in interface IInterfaceCollection
offset
- offset of the superinterface pointer to replace [must be in [0, size()) range]interface_index
- constant pool index [must be positive; input not validated]