Enum jbcrs_basic::Item
[−]
[src]
pub enum Item { UTF8(String), Integer(i32), Float(f32), Long(i64), Double(f64), Class(u16), String(u16), FieldRef { class: u16, name_and_type: u16, }, MethodRef { class: u16, name_and_type: u16, }, InterfaceMethodRef { class: u16, name_and_type: u16, }, NameAndType { name: u16, desc: u16, }, MethodHandle { kind: ReferenceKind, index: u16, }, MethodType(u16), InvokeDynamic { bootstrap_method: u16, name_and_type: u16, }, Module(u16), Package(u16), }
A constant pool item
Variants
UTF8(String)
An UTF-8 encoded string. Inside the class file itself, a modified format is used.
Integer(i32)
An int
.
Float(f32)
A float
.
Long(i64)
A long
.
Takes two spots, instead of one.
Double(f64)
A double
.
Takes two spots, instead of one.
Class(u16)
An index to the name of the class, or the descriptor of an array type.
Always refers to an Item::UTF8(_)
.
String(u16)
A java.lang.String
object.
FieldRef
Describes a field reference.
Fields of FieldRef
class: u16 | The index to an |
name_and_type: u16 | The index to an |
MethodRef
Describes a method reference.
Fields of MethodRef
class: u16 | The index to an |
name_and_type: u16 | The index to an |
InterfaceMethodRef
Describes a method reference, where the class is an interface.
Fields of InterfaceMethodRef
class: u16 | The index to an |
name_and_type: u16 | The index to an |
NameAndType
Represents a field or method, without indicating which class or type it belongs to.
Fields of NameAndType
name: u16 | The index to an |
desc: u16 | The index to an |
MethodHandle
Represents a method handle
Fields of MethodHandle
kind: ReferenceKind | Characterizes its bytecode behaviour. |
index: u16 | If kind is either GetField, GetStatic, PutField, or PutStatic,
the entry at that index must be a |
MethodType(u16)
Describes a method type.
The entry at that index must be an Item::UTF8(_)
representing a method descriptor.
InvokeDynamic
Describes a invoke dynamic instruction, and specifies information regarding the bootstrap method.
Fields of InvokeDynamic
bootstrap_method: u16 | The index to an entry of the BootstrapMethods attribute of the class file. |
name_and_type: u16 | The index to an |
Module(u16)
Represents a module.
The entry at that index must be a Item::UTF8(_)
with a valid name.
The class must have the MODULE flag set.
Package(u16)
Represents a package exported or opened by a module.
The entry at that index must be an Item::UTF8(_)
with a valid package name encoded in internal form.
The class must have the MODULE flag set.
Trait Implementations
impl Debug for Item
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for Item
[src]
fn clone(&self) -> Item
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Hash for Item
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl PartialEq for Item
[src]
fn eq(&self, other: &Item) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.