@@ -4,20 +4,20 @@ use jni_sys::*;
44
55use crate :: { Env , Global , Local , Ref , ReferenceType } ;
66
7- /// FFI: Use **Argument \<java::lang::Object\>** instead of jobject. This represents a (null?) function argument.
7+ /// FFI: Use **Arg \<java::lang::Object\>** instead of jobject. This represents a (null?) function argument.
88///
99/// Unlike most Java reference types from this library, this *can* be null.
1010///
1111/// FFI safe where a jobject is safe, assuming you match your types correctly. Using the wrong type may result in
1212/// soundness issues, but at least on Android mostly seems to just result in JNI aborting execution for the current
1313/// process when calling methods on an instance of the wrong type.
1414#[ repr( transparent) ]
15- pub struct Argument < T : ReferenceType > {
15+ pub struct Arg < T : ReferenceType > {
1616 object : jobject ,
1717 _class : PhantomData < T > ,
1818}
1919
20- impl < T : ReferenceType > Argument < T > {
20+ impl < T : ReferenceType > Arg < T > {
2121 /// **unsafe**: There's no guarantee the jobject being passed is valid or null, nor any means of checking it.
2222 pub unsafe fn from_raw ( object : jobject ) -> Self {
2323 Self {
@@ -31,7 +31,7 @@ impl<T: ReferenceType> Argument<T> {
3131 }
3232
3333 /// **unsafe**: This assumes the argument belongs to the given Env/VM, which is technically unsound. However, the
34- /// intended use case of immediately converting any Argument s into ArgumentRef s at the start of a JNI callback,
34+ /// intended use case of immediately converting any Arg s into ArgRef s at the start of a JNI callback,
3535 /// where Java directly invoked your function with an Env + arguments, is sound.
3636 pub unsafe fn into_ref < ' env > ( self , env : Env < ' env > ) -> Option < Ref < ' env , T > > {
3737 if self . object . is_null ( ) {
@@ -42,7 +42,7 @@ impl<T: ReferenceType> Argument<T> {
4242 }
4343
4444 /// **unsafe**: This assumes the argument belongs to the given Env/VM, which is technically unsound. However, the
45- /// intended use case of immediately converting any Argument s into ArgumentRef s at the start of a JNI callback,
45+ /// intended use case of immediately converting any Arg s into ArgRef s at the start of a JNI callback,
4646 /// where Java directly invoked your function with an Env + arguments, is sound.
4747 pub unsafe fn into_local < ' env > ( self , env : Env < ' env > ) -> Option < Local < ' env , T > > {
4848 if self . object . is_null ( ) {
@@ -53,7 +53,7 @@ impl<T: ReferenceType> Argument<T> {
5353 }
5454
5555 /// **unsafe**: This assumes the argument belongs to the given Env/VM, which is technically unsound. However, the
56- /// intended use case of immediately converting any Argument s into ArgumentRef s at the start of a JNI callback,
56+ /// intended use case of immediately converting any Arg s into ArgRef s at the start of a JNI callback,
5757 /// where Java directly invoked your function with an Env + arguments, is sound.
5858 pub unsafe fn into_global ( self , env : Env ) -> Option < Global < T > > {
5959 if self . object . is_null ( ) {
0 commit comments