pub enum JvmType {
Byte,
Short,
Int,
Long,
Float,
Double,
Boolean,
Char,
Void,
Object(String),
Array(Box<JvmType>),
Generic(String),
}Expand description
JVM field/method descriptor types.
Variants§
Byte
B — signed 8-bit integer
Short
S — signed 16-bit integer
Int
I — signed 32-bit integer
Long
J — signed 64-bit integer
Float
F — 32-bit IEEE 754 float
Double
D — 64-bit IEEE 754 double
Boolean
Z — boolean
Char
C — UTF-16 code unit
Void
V — no return value
Object(String)
Lclass/name; — object reference
Array(Box<JvmType>)
[T — array of T
Generic(String)
Erased generic type variable (represented as java/lang/Object)
Implementations§
Source§impl JvmType
impl JvmType
Sourcepub fn descriptor(&self) -> String
pub fn descriptor(&self) -> String
Returns the JVM field descriptor string (e.g. "I", "[Ljava/lang/String;").
Sourcepub fn slot_size(&self) -> usize
pub fn slot_size(&self) -> usize
Returns the size in JVM local-variable / stack slots (1 or 2).
Sourcepub fn is_reference(&self) -> bool
pub fn is_reference(&self) -> bool
true for reference types (Object, Array, Generic).
Sourcepub fn is_int_category(&self) -> bool
pub fn is_int_category(&self) -> bool
true for integer-category types (Byte, Short, Int, Boolean, Char).
Trait Implementations§
impl Eq for JvmType
impl StructuralPartialEq for JvmType
Auto Trait Implementations§
impl Freeze for JvmType
impl RefUnwindSafe for JvmType
impl Send for JvmType
impl Sync for JvmType
impl Unpin for JvmType
impl UnsafeUnpin for JvmType
impl UnwindSafe for JvmType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more