Enum rust_jvm::model::class_file::constant_pool::ConstantPoolInfo [] [src]

pub enum ConstantPoolInfo {
    Class {
        name_index: constant_pool_index,
    },
    FieldRef {
        class_index: constant_pool_index,
        name_and_type_index: constant_pool_index,
    },
    MethodRef {
        class_index: constant_pool_index,
        name_and_type_index: constant_pool_index,
    },
    InterfaceMethodRef {
        class_index: constant_pool_index,
        name_and_type_index: constant_pool_index,
    },
    String {
        string_index: u2,
    },
    Integer {
        bytes: u4,
    },
    Float {
        bytes: u4,
    },
    Long {
        high_bytes: u4,
        low_bytes: u4,
    },
    Double {
        high_bytes: u4,
        low_bytes: u4,
    },
    NameAndType {
        name_index: constant_pool_index,
        descriptor_index: constant_pool_index,
    },
    Utf8 {
        bytes: Vec<u1>,
    },
    MethodHandle {
        reference: MethodReference,
    },
    MethodType {
        descriptor_index: constant_pool_index,
    },
    InvokeDynamic {
        bootstrap_method_attr_index: constant_pool_index,
        name_and_type_index: constant_pool_index,
    },
    Unusable,
}

Variants

Class

The CONSTANT_Class_info structure §4.4.1.

Fields

name_index
FieldRef

Fields

class_index
name_and_type_index
MethodRef

Fields

class_index
name_and_type_index
InterfaceMethodRef

Fields

class_index
name_and_type_index
String

Fields

string_index
Integer

Fields

bytes
Float

Fields

bytes
Long

Fields

high_bytes
low_bytes
Double

Fields

high_bytes
low_bytes
NameAndType

Fields

name_index
descriptor_index
Utf8

Fields

bytes
MethodHandle

Fields

reference
MethodType

Fields

descriptor_index
InvokeDynamic

Fields

bootstrap_method_attr_index

A valid index into the bootstrap_methods array of the bootstrap method table.

name_and_type_index

A valid index into the constant_pool table. The constant_pool entry at that index must be a valid ConstantPoolInfo::Utf8 structure representing the name of the attribute.

Unusable

Indicates an unusable constant pool entry.

All 8-byte constants take up two entries in the constant_pool table of the class file. If a CONSTANT_Long_info or CONSTANT_Double_info structure is the item in the constant_pool table at index n, then the next usable item in the pool is located at index n + 2. The constant_pool index n + 1 must be valid but is considered unusable.

Methods

impl ConstantPoolInfo

fn tag(&self) -> Tag

Trait Implementations

Derived Implementations

impl PartialEq for ConstantPoolInfo

fn eq(&self, __arg_0: &ConstantPoolInfo) -> bool

fn ne(&self, __arg_0: &ConstantPoolInfo) -> bool

impl Debug for ConstantPoolInfo

fn fmt(&self, __arg_0: &mut Formatter) -> Result