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

An UTF-8 encoded string. Inside the class file itself, a modified format is used.

An int.

A float.

A long. Takes two spots, instead of one.

A double. Takes two spots, instead of one.

An index to the name of the class, or the descriptor of an array type. Always refers to an Item::UTF8(_).

A java.lang.String object.

Describes a field reference.

Fields of FieldRef

The index to an Item::Class(_). Can be either a Class, or an Interface.

The index to an Item::NameAndType { .. }.

Describes a method reference.

Fields of MethodRef

The index to an Item::Class(_). Must be a Class.

The index to an Item::NameAndType { .. }.

Describes a method reference, where the class is an interface.

Fields of InterfaceMethodRef

The index to an Item::Class(_). Must be an Interface.

The index to an Item::NameAndType { .. }.

Represents a field or method, without indicating which class or type it belongs to.

Fields of NameAndType

The index to an Item::UTF8(_). Must either be a valid unqualfied name or <init>.

The index to an Item::UTF8(_). Represents a valid field or method descriptor.

Represents a method handle

Fields of MethodHandle

Characterizes its bytecode behaviour.

If kind is either GetField, GetStatic, PutField, or PutStatic, the entry at that index must be a Item::FieldRef { .. }. If kind is InvokeVirtual or InvokeSpecial, the entry at that index must be Item::MethodRef { .. }. If kind is InvokeStatic or InvokeSpecial and the version of the class is less than 52.0, the entry at that index must be Item::MethodRef { .. }. If it is 52.0 or above, it must either be a MethodRef or an Item::InterfaceMethodRef { .. }. If kind is InvokeInterface, the entry at that index must be an Item::InterfaceMethodRef { .. }.

Describes a method type. The entry at that index must be an Item::UTF8(_) representing a method descriptor.

Describes a invoke dynamic instruction, and specifies information regarding the bootstrap method.

Fields of InvokeDynamic

The index to an entry of the BootstrapMethods attribute of the class file.

The index to an Item::NameAndType { .. }.

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.

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]

[src]

Formats the value using the given formatter. Read more

impl Clone for Item
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Hash for Item
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl PartialEq for Item
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl Eq for Item
[src]

Auto Trait Implementations

impl Send for Item

impl Sync for Item