pub struct Class<'a> {
pub class: JClass<'a>,
/* private fields */
}
Expand description
Class describes java.lang.Class, with getters for often used classes from the Java standard library.
Fields
class: JClass<'a>
The underlying JClass
Implementations
sourceimpl<'a> Class<'a>
impl<'a> Class<'a>
sourcepub fn new(env: &'a JNIEnv<'a>, class: JClass<'a>) -> Self
pub fn new(env: &'a JNIEnv<'a>, class: JClass<'a>) -> Self
Create a new Class from it’s raw compontents
sourcepub fn CharSequence(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn CharSequence(env: &'a JNIEnv<'a>) -> Result<Self>
java.lang.CharSequence
sourcepub fn StringBuilder(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn StringBuilder(env: &'a JNIEnv<'a>) -> Result<Self>
java.lang.StringBuilder
sourcepub fn BigDecimal(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn BigDecimal(env: &'a JNIEnv<'a>) -> Result<Self>
java.math.BigDecimal
sourcepub fn BigInteger(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn BigInteger(env: &'a JNIEnv<'a>) -> Result<Self>
java.math.BigInteger
sourcepub fn Constructor(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn Constructor(env: &'a JNIEnv<'a>) -> Result<Self>
java.lang.reflect.Constructor
sourcepub fn Properties(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn Properties(env: &'a JNIEnv<'a>) -> Result<Self>
java.util.Properties
sourcepub fn LinkedList(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn LinkedList(env: &'a JNIEnv<'a>) -> Result<Self>
java.util.LinkedList
sourcepub fn LinkedHashSet(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn LinkedHashSet(env: &'a JNIEnv<'a>) -> Result<Self>
java.util.LinkedHashSet
sourcepub fn LinkedHashMap(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn LinkedHashMap(env: &'a JNIEnv<'a>) -> Result<Self>
java.util.LinkedHashMap
sourcepub fn IdentityHashMap(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn IdentityHashMap(env: &'a JNIEnv<'a>) -> Result<Self>
java.util.IdentityHashMap
sourcepub fn Enumeration(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn Enumeration(env: &'a JNIEnv<'a>) -> Result<Self>
java.util.Enumeration
sourcepub fn Comparator(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn Comparator(env: &'a JNIEnv<'a>) -> Result<Self>
java.util.Comparator
sourcepub fn Comparators(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn Comparators(env: &'a JNIEnv<'a>) -> Result<Self>
java.util.Comparators
sourcepub fn Collection(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn Collection(env: &'a JNIEnv<'a>) -> Result<Self>
java.util.Collection
sourcepub fn AtomicInteger(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn AtomicInteger(env: &'a JNIEnv<'a>) -> Result<Self>
java.util.concurrent.atomic.AtomicInteger
sourcepub fn AtomicLong(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn AtomicLong(env: &'a JNIEnv<'a>) -> Result<Self>
java.util.concurrent.atomic.AtomicLong
sourcepub fn AtomicReference(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn AtomicReference(env: &'a JNIEnv<'a>) -> Result<Self>
java.util.concurrent.atomic.AtomicReference
sourcepub fn AtomicIntegerArray(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn AtomicIntegerArray(env: &'a JNIEnv<'a>) -> Result<Self>
java.util.concurrent.atomic.AtomicIntegerArray
sourcepub fn AtomicIntegerFieldUpdater(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn AtomicIntegerFieldUpdater(env: &'a JNIEnv<'a>) -> Result<Self>
java.util.concurrent.atomic.AtomicIntegerFieldUpdater
sourcepub fn AtomicLongArray(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn AtomicLongArray(env: &'a JNIEnv<'a>) -> Result<Self>
java.util.concurrent.atomic.AtomicLongArray
sourcepub fn AtomicLongFieldUpdater(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn AtomicLongFieldUpdater(env: &'a JNIEnv<'a>) -> Result<Self>
java.util.concurrent.atomic.AtomicLongFieldUpdater
sourcepub fn AtomicMarkableReference(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn AtomicMarkableReference(env: &'a JNIEnv<'a>) -> Result<Self>
java.util.concurrent.atomic.AtomicMarkableReference
sourcepub fn AtomicReferenceArray(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn AtomicReferenceArray(env: &'a JNIEnv<'a>) -> Result<Self>
java.util.concurrent.atomic.AtomicReferenceArray
sourcepub fn AtomicReferenceFieldUpdater(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn AtomicReferenceFieldUpdater(env: &'a JNIEnv<'a>) -> Result<Self>
java.util.concurrent.atomic.AtomicReferenceFieldUpdater
sourcepub fn DoubleAccumulator(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn DoubleAccumulator(env: &'a JNIEnv<'a>) -> Result<Self>
java.util.concurrent.atomic.DoubleAccumulator
sourcepub fn DoubleAdder(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn DoubleAdder(env: &'a JNIEnv<'a>) -> Result<Self>
java.util.concurrent.atomic.DoubleAdder
sourcepub fn LongAccumulator(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn LongAccumulator(env: &'a JNIEnv<'a>) -> Result<Self>
java.util.concurrent.atomic.LongAccumulator
sourcepub fn InputStream(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn InputStream(env: &'a JNIEnv<'a>) -> Result<Self>
java.io.InputStream
sourcepub fn OutputStream(env: &'a JNIEnv<'a>) -> Result<Self>
pub fn OutputStream(env: &'a JNIEnv<'a>) -> Result<Self>
java.io.OutputStream
sourcepub fn for_name<S: AsRef<str>>(env: &'a JNIEnv<'a>, name: S) -> Result<Self>
pub fn for_name<S: AsRef<str>>(env: &'a JNIEnv<'a>, name: S) -> Result<Self>
Find a class by it’s Java name. Can be in the format:
java/lang/String
java.lang.String
sourcepub fn array_type(&self, env: &'a JNIEnv<'a>) -> Result<Self>
pub fn array_type(&self, env: &'a JNIEnv<'a>) -> Result<Self>
Get the array type of a class. E.g java.lang.String
results in java.lang.String[]
sourcepub fn is_compatible(&self, other: &Class<'a>) -> Result<bool>
pub fn is_compatible(&self, other: &Class<'a>) -> Result<bool>
Check if the current Class can be safely cast to the the other Class. E.g java.util.HashMap
is compatible with java.util.Map
sourcepub fn get_superclass(&self) -> Result<Option<Class<'a>>>
pub fn get_superclass(&self) -> Result<Option<Class<'a>>>
Get the superclass of the current Class. Returns None if the current class has no superclass other than java.lang.Object, or if the current Class is an interface
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Class<'a>
impl<'a> !Send for Class<'a>
impl<'a> !Sync for Class<'a>
impl<'a> Unpin for Class<'a>
impl<'a> UnwindSafe for Class<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more