WPILibC++ 2023.4.3
wpi::java::JClass Class Reference

Finds a class and keeps it as a global reference. More...

#include <wpi/jni_util.h>

Inheritance diagram for wpi::java::JClass:
wpi::java::JException

Public Member Functions

 JClass ()=default
 
 JClass (JNIEnv *env, const char *name)
 
void free (JNIEnv *env)
 
 operator bool () const
 
 operator jclass () const
 

Protected Attributes

jclass m_cls = nullptr
 

Detailed Description

Finds a class and keeps it as a global reference.

Use with caution, as the destructor does NOT call DeleteGlobalRef due to potential shutdown issues with doing so.

Constructor & Destructor Documentation

◆ JClass() [1/2]

wpi::java::JClass::JClass ( )
default

◆ JClass() [2/2]

wpi::java::JClass::JClass ( JNIEnv *  env,
const char *  name 
)
inline

Member Function Documentation

◆ free()

void wpi::java::JClass::free ( JNIEnv *  env)
inline

◆ operator bool()

wpi::java::JClass::operator bool ( ) const
inlineexplicit

◆ operator jclass()

wpi::java::JClass::operator jclass ( ) const
inline

Member Data Documentation

◆ m_cls

jclass wpi::java::JClass::m_cls = nullptr
protected

The documentation for this class was generated from the following file: