java/Object: use type aliases

This commit is contained in:
Max Kellermann 2021-07-23 18:02:46 +02:00 committed by Max Kellermann
parent 8e430e55af
commit 917fe549b0
1 changed files with 2 additions and 12 deletions

View File

@ -41,19 +41,9 @@ namespace Java {
/**
* Wrapper for a local "jobject" reference.
*/
typedef LocalRef<jobject> LocalObject;
using LocalObject = LocalRef<jobject>;
class GlobalObject : public GlobalRef<jobject> {
public:
/**
* Constructs an uninitialized object. The method
* set() must be called before it is destructed.
*/
GlobalObject() = default;
GlobalObject(JNIEnv *env, jobject obj) noexcept
:GlobalRef<jobject>(env, obj) {}
};
using GlobalObject = GlobalRef<jobject>;
/**
* Utilities for java.net.Object.