Struct jbcrs::basic::Pool [] [src]

pub struct Pool { /* fields omitted */ }

The constant pool found in every java class file. It is used to have fast lookup for entries and small files.

Methods

impl Pool
[src]

[src]

[src]

[src]

Pushes a new item on the pool, returning the index to it. If the pool size exceeds u16::max_value() an error will be returned. We won't check for duplicates here since this method should be used when reading since later items should be accessed by index. We will also gain performance benefits.

[src]

Returns a Vector containing pointers to Items.

The Nones inside the items Vec are filtered.

[src]

Returns the element at a specified index. If the index is 0 or greater than the size of the pool, an error is returned.

[src]

Returns a cloned String at a specified index.

[src]

Returns a class name at a specified index, but if the utf index is 0, None is returned.

[src]

Returns a class name at a specified index.

Trait Implementations

impl Default for Pool
[src]

[src]

Returns the "default value" for a type. Read more