System

Struct System 

Source
pub struct System;
Expand description

java.lang.System

Implementations§

Source§

impl System

Source

pub fn get_env(e: &mut Env<'_>, key: impl ToString) -> Option<String>

String java.lang.System.getenv(String)

Source

pub fn get_property(e: &mut Env<'_>, key: impl ToString) -> Option<String>

String java.lang.System.getProperty(String)

Source

pub fn set_property( e: &mut Env<'_>, key: impl ToString, value: impl ToString, ) -> Option<String>

String java.lang.System.setProperty(String)

Returns Some(val) when there was a previous value.

Source

pub fn gc(e: &mut Env<'_>)

java.lang.System.gc()

Source

pub fn load_library_file(e: &mut Env<'_>, filename: impl ToString)

java.lang.System.load(String)

Source

pub fn load_library(e: &mut Env<'_>, libname: impl ToString)

java.lang.System.loadLibrary(String)

Source

pub fn console(e: &mut Env<'_>) -> Nullable<Console>

java.lang.System.console()

Source

pub fn exit(e: &mut Env<'_>, status: i32)

java.lang.System.exit(int)

Source

pub fn out(e: &mut Env<'_>) -> PrintStream

java.lang.System.out

Source

pub fn err(e: &mut Env<'_>) -> PrintStream

java.lang.System.err

Trait Implementations§

Source§

impl Class for System

Source§

const PATH: &'static str = "java/lang/System"

The fully qualified java class path (slash-separated) Read more
Source§

impl Clone for System

Source§

fn clone(&self) -> System

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 System

Source§

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

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

impl Object for System

Source§

fn upcast(_: &mut Env<'_>, _: Object) -> Self

Try to interpret an object as Self
Source§

fn downcast(self, _: &mut Env<'_>) -> Object

Create an object reference from self
Source§

fn downcast_ref(&self, _: &mut Env<'_>) -> Object

Create an object reference from &self
Source§

fn upcast_value_ref<'e>(e: &mut Env<'e>, jv: JValue<'e, '_>) -> Self
where Self: Sized,

Try to interpret a JValue as Self
Source§

fn upcast_value<'e>(e: &mut Env<'e>, jv: JValueOwned<'e>) -> Self
where Self: Sized,

Try to interpret a JValueOwned as Self
Source§

fn downcast_value<'e>(self, e: &mut Env<'e>) -> JValueOwned<'e>
where Self: Sized,

Create a JValueOwned from self
Source§

fn yield_to_java(&self, e: &mut Env<'_>) -> jobject

Use this to yield ownership of a java::lang::Object to the JVM, for example when returning a jobject from a native function.
Source§

impl Copy for System

Auto Trait Implementations§

§

impl Freeze for System

§

impl RefUnwindSafe for System

§

impl Send for System

§

impl Sync for System

§

impl Unpin for System

§

impl UnwindSafe for System

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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<F, A, TF, T> Sequence<F, A, TF> for T

Source§

fn sequence<Ap>(self) -> <Ap as HKT1>::T<<F as HKT1>::T<A>>
where Self: Sized + Traversable<F, <Ap as HKT1>::T<A>, A, TF> + Foldable<F, <Ap as HKT1>::T<A>>, Ap: HKT1, <Ap as HKT1>::T<A>: Applicative<Ap, A> + ApplyOnce<Ap, A>, <Ap as HKT1>::T<TF>: Applicative<Ap, TF> + ApplyOnce<Ap, TF>, <Ap as HKT1>::T<<F as HKT1>::T<A>>: Applicative<Ap, <F as HKT1>::T<A>> + ApplyOnce<Ap, <F as HKT1>::T<A>>, F: HKT1<T<<Ap as HKT1>::T<A>> = Self>,

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.
Source§

impl<T> Type for T
where T: Class,

Source§

const SIG: Signature = const SIG: Signature = Signature::class(T::PATH);

The signature for this type
Source§

fn jni() -> JavaType

Get the jni rep of this type
Source§

fn is_type_of(e: &mut Env<'_>, o: &JObject<'_>) -> bool

Determines whether an object is an instance of this type
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V