#include <constantpool.hpp>
Public Member Functions | |
ConstantPool () | |
Default constructor. | |
~ConstantPool () | |
Destructor. | |
unsigned int | count () const |
get the number of items in the constant pool | |
unsigned int | add (cp_info *entry) |
Add an entry to the constant pool. | |
void | write (std::ofstream &stream) const |
Write constant pool entries to stream. | |
Private Attributes | |
std::vector< cp_info * > | Entries |
unsigned int | ConstantPoolCount |
This class represents a constant pool of a class file. You can add entries to it and make it write itself to a class stream.
Definition at line 30 of file constantpool.hpp.
|
Default constructor. Initialises the pool count and the pool stack. Definition at line 20 of file constantpool.cpp. |
|
Destructor. Deletes all the objects in the constant pool. Definition at line 32 of file constantpool.cpp. |
|
Add an entry to the constant pool.
Definition at line 50 of file constantpool.cpp. Referenced by ClassEncoder::ByteCode::emit_getstatic(), ClassEncoder::ByteCode::emit_invokeinterface(), ClassEncoder::ByteCode::emit_invokespecial(), ClassEncoder::ByteCode::emit_invokestatic(), ClassEncoder::ByteCode::emit_invokevirtual(), ClassEncoder::ByteCode::emit_multianewarray(), ClassEncoder::ByteCode::emit_new(), ClassEncoder::method_info::finish(), and ClassEncoder::Class::write(). |
|
Write constant pool entries to stream.
Definition at line 60 of file constantpool.cpp. Referenced by ClassEncoder::Class::write(). |