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)
IInterfaceCollectionCONSTANT_Class_info
constant pool index for offset'th direct superinterface.get in interface IInterfaceCollectionoffset - superinterface number [must be in [0, size()) range]public int size()
IInterfaceCollectionsize in interface IInterfaceCollectionpublic java.lang.Object clone()
clone in interface IInterfaceCollectionclone in class java.lang.Objectpublic void writeInClassFormat(UDataOutputStream out) throws java.io.IOException
writeInClassFormat in interface IClassFormatOutputjava.io.IOExceptionpublic void accept(IClassDefVisitor visitor, java.lang.Object ctx)
accept in interface IInterfaceCollectionpublic int add(int interface_index)
IInterfaceCollectionadd in interface IInterfaceCollectioninterface_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)
IInterfaceCollectionset in interface IInterfaceCollectionoffset - offset of the superinterface pointer to replace [must be in [0, size()) range]interface_index - constant pool index [must be positive; input not validated]