pub enum JavaType {
Byte(u8),
Short(i16),
Int(i32),
Long(i64),
Float(f32),
Double(f64),
Boolean(bool),
Char(char),
Void,
String(String),
}
Expand description
The eight primitive types of java
Variants§
Byte(u8)
an 8-bit signed two’s complement integer, ranging from -128 to 127
Short(i16)
a 16-bit signed two’s complement integer, ranging from -32,768 to 32,767
Int(i32)
a 32-bit signed two’s complement integer, ranging from -2,147,483,648 to 2,147,483,647
Long(i64)
a 64-bit signed two’s complement integer, ranging from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
Float(f32)
a single-precision 32-bit IEEE 754 floating-point number
Double(f64)
a double-precision 64-bit IEEE 754 floating-point number
Boolean(bool)
a data type that can only take on the values true or false
Char(char)
a single 16-bit Unicode character, representing a wide range of characters from different languages and scripts.
Void
Returns nothing
String(String)
A String
Implementations§
source§impl<'local> JavaType
impl<'local> JavaType
pub fn new_string( env: &JNIEnv<'local>, _: &JClass<'local>, value: &str ) -> EasyJNIResult<JString<'local>>
pub fn new_jvalue_string( env: &JNIEnv<'local>, _: &JClass<'local>, value: &str ) -> EasyJNIResult<JValueOwned<'local>>
pub fn to_jni_jvalue( &self, env: &JNIEnv<'local>, _: &JClass<'local> ) -> EasyJNIResult<JValueOwned<'local>>
pub fn to_jni_object( &'local self, env: &mut JNIEnv<'local>, java_class: &'local JClass<'local> ) -> EasyJNIResult<JObject<'local>>
pub fn java_class( &'local self, env: &mut JNIEnv<'local>, _: &JClass<'local> ) -> EasyJNIResult<JClass<'_>>
pub fn java_signature(&self) -> &str
pub fn java_class_name(&self) -> String
pub fn to_java_type_signature(&self) -> JavaTypeSignature
Trait Implementations§
source§impl PartialEq<JavaType> for JavaType
impl PartialEq<JavaType> for JavaType
source§impl PartialOrd<JavaType> for JavaType
impl PartialOrd<JavaType> for JavaType
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl StructuralPartialEq for JavaType
Auto Trait Implementations§
impl RefUnwindSafe for JavaType
impl Send for JavaType
impl Sync for JavaType
impl Unpin for JavaType
impl UnwindSafe for JavaType
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