ConstantPoolEntry

Enum ConstantPoolEntry 

Source
pub enum ConstantPoolEntry {
Show 17 variants Class { name_index: ConstantPoolIndex, }, FieldRef { class_index: ConstantPoolIndex, name_and_type_index: ConstantPoolIndex, }, MethodRef { class_index: ConstantPoolIndex, name_and_type_index: ConstantPoolIndex, }, InterfaceMethodRef { class_index: ConstantPoolIndex, name_and_type_index: ConstantPoolIndex, }, String { string_index: ConstantPoolIndex, }, Integer { bytes: i32, }, Float { bytes: f32, }, Long { high_bytes: u32, low_bytes: u32, }, Double { high_bytes: u32, low_bytes: u32, }, NameAndType { name_index: ConstantPoolIndex, descriptor_index: ConstantPoolIndex, }, Utf8 { length: u16, bytes: Vec<u8>, }, MethodHandle { reference_kind: u8, reference_index: ConstantPoolIndex, }, MethodType { descriptor_index: ConstantPoolIndex, }, Dynamic { bootstrap_method_attr_index: ConstantPoolIndex, name_and_type_index: ConstantPoolIndex, }, InvokeDynamic { bootstrap_method_attr_index: ConstantPoolIndex, name_and_type_index: ConstantPoolIndex, }, Module { name_index: ConstantPoolIndex, }, Package { name_index: ConstantPoolIndex, },
}

Variants§

§

Class

The CONSTANT_Class_info constant is used to represent a class or an interface. https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.4.1

Fields

§

FieldRef

The CONSTANT_Fieldref_info constant is used to represent a reference to a field. https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.4.2

Fields

§class_index: ConstantPoolIndex
§name_and_type_index: ConstantPoolIndex
§

MethodRef

The CONSTANT_Methodref_info constant is used to represent a reference to a method. https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.4.2

Fields

§class_index: ConstantPoolIndex
§name_and_type_index: ConstantPoolIndex
§

InterfaceMethodRef

The CONSTANT_InterfaceMethodref_info constant is used to represent a reference to an interface method. https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.4.2

Fields

§class_index: ConstantPoolIndex
§name_and_type_index: ConstantPoolIndex
§

String

The CONSTANT_String_info constant is used to represent constant objects of the type String https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.4.3

Fields

§string_index: ConstantPoolIndex
§

Integer

The CONSTANT_Integer_info constant is used to represent 4-byte numeric (int) constants. https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.4.4

Fields

§bytes: i32
§

Float

The CONSTANT_Float_info constant is used to represent 4-byte floating-point constants. https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.4.4

Fields

§bytes: f32
§

Long

The CONSTANT_Long_info constant is used to represent 8-byte numeric (long) constants. https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.4.5

Fields

§high_bytes: u32
§low_bytes: u32
§

Double

The CONSTANT_Double_info constant is used to represent 8-byte numeric (double) constants. https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.4.5

Fields

§high_bytes: u32
§low_bytes: u32
§

NameAndType

The CONSTANT_NameAndType_info constant is used to represent a field or method, without indicating which class or interface type it belongs to. https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.4.6

Fields

§descriptor_index: ConstantPoolIndex
§

Utf8

The CONSTANT_Utf8_info constant is used to represent constant string values. https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.4.7

Fields

§length: u16
§bytes: Vec<u8>
§

MethodHandle

The CONSTANT_MethodHandle_info constant is used to represent a method handle. https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.4.8

Fields

§reference_kind: u8
§reference_index: ConstantPoolIndex
§

MethodType

The CONSTANT_MethodType_info constant is used to represent a method type. https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.4.9

Fields

§descriptor_index: ConstantPoolIndex
§

Dynamic

The CONSTANT_Dynamic_info constant is used to represent a dynamically-computed constant. https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.4.10

Fields

§bootstrap_method_attr_index: ConstantPoolIndex
§name_and_type_index: ConstantPoolIndex
§

InvokeDynamic

The CONSTANT_InvokeDynamic_info constant is used to represent an invokedynamic call site. https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.4.10

Fields

§bootstrap_method_attr_index: ConstantPoolIndex
§name_and_type_index: ConstantPoolIndex
§

Module

The CONSTANT_Module_info constant is used to represent a module. https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.4.11

Fields

§

Package

The CONSTANT_Package_info constant is used to represent a package exported or opened by a module. https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.4.12

Fields

Trait Implementations§

Source§

impl Clone for ConstantPoolEntry

Source§

fn clone(&self) -> ConstantPoolEntry

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ConstantPoolEntry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ConstantPoolEntry

Source§

fn eq(&self, other: &ConstantPoolEntry) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for ConstantPoolEntry

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.