26#ifndef JAU_JAVA_UPLINK_HPP_
27#define JAU_JAVA_UPLINK_HPP_
53 virtual
std::
string toString() const noexcept {
return "JavaAnon[???]"; }
71 if(
nullptr == javaObjectRef ) {
72 return "JavaAnon[null]";
73 }
else if( 0 == javaObjectRef.use_count() ) {
74 return "JavaAnon[empty]";
76 return javaObjectRef->toString();
101 javaObjectRef =
nullptr;
Pure virtual JavaAnon, hiding Java JNI details from API, to be implemented by JNI module.
virtual std::string toString() const noexcept
virtual ~JavaAnon() noexcept=default
Sharing the anonymous Java object (JavaAnon), i.e.
virtual std::string get_java_class() const noexcept=0
void setJavaObject(const JavaAnonRef &objRef) noexcept
Assigns a new shared JavaAnon reference, replaced item might be deleted via JNI from dtor.
std::string javaObjectToString() const noexcept
virtual std::string toString() const noexcept
void setJavaObject() noexcept
Resets the shared JavaAnon reference, the replaced item might be deleted via JNI from dtor.
virtual void checkValidInstance() const
Throws an IllegalStateException if instance is not valid.
JavaUplink() noexcept=default
const JavaAnonRef & getJavaObject() noexcept
std::shared_ptr< JavaUplink > JavaUplinkRef
std::shared_ptr< JavaAnon > JavaAnonRef
std::string to_hexstring(value_type const &v) noexcept
Produce a lower-case hexadecimal string representation of the given pointer.