6 #ifndef xmog_java_class_inc
7 #define xmog_java_class_inc
16 #include "xmog_java_ref.h"
46 typedef void (XMOG_CALLING_CONVENTION *XMOG_THROW_METHOD)( jobject exc, xmog_flags
flags );
125 IcpDoneWithResult = 1,
151 IcpStringFromNativeChars = 7,
152 IcpNativeCharsFromString = 8,
154 IcpIsInstanceOf = 10,
180 xmog_java_value * result,
182 xmog_flags &
flags );
189 static jbyte MAXIMUM_SUPPORTED_MAJOR_VERSION;
191 XMOG_FACTORY_METHOD factoryMethod_;
193 XMOG_THROW_METHOD throwMethod_;
195 XMOG_TOJAVA_METHOD toJavaMethod_;
197 XMOG_FROMJAVA_METHOD fromJavaMethod_;
199 char * classNameUTF_;
223 bool bOwnsClassName_;
229 bool bHasUnmarshaller_;
242 XMOG_INTERCEPTOR icp_;
245 static int ICP_COUNT;
247 void initClassFromClassName(
xmog_localenv * env = NULL,
bool bSuppressExceptions =
false );
251 jclass defineClass(
const char * classNameUtf, jobject clToUse,
const jbyte * bytes, jint length,
xmog_localenv * env );
281 bool bDelayInit =
false,
282 XMOG_FACTORY_METHOD factoryMethod = NULL_FACTORY_METHOD,
283 XMOG_THROW_METHOD throwMethod = NULL_THROW_METHOD,
284 XMOG_TOJAVA_METHOD toJavaMethod = NULL_TOJAVA_METHOD,
285 XMOG_FROMJAVA_METHOD fromJavaMethod = NULL_FROMJAVA_METHOD,
314 const char * version,
316 bool bDelayInit =
false,
317 XMOG_FACTORY_METHOD factoryMethod = NULL_FACTORY_METHOD,
318 XMOG_THROW_METHOD throwMethod = NULL_THROW_METHOD,
319 XMOG_TOJAVA_METHOD toJavaMethod = NULL_TOJAVA_METHOD,
320 XMOG_FROMJAVA_METHOD fromJavaMethod = NULL_FROMJAVA_METHOD,
348 bool bDelayInit =
false,
349 XMOG_FACTORY_METHOD factoryMethod = NULL_FACTORY_METHOD,
350 XMOG_THROW_METHOD throwMethod = NULL_THROW_METHOD,
351 XMOG_TOJAVA_METHOD toJavaMethod = NULL_TOJAVA_METHOD,
352 XMOG_FROMJAVA_METHOD fromJavaMethod = NULL_FROMJAVA_METHOD,
388 bool bDelayInit =
false,
389 XMOG_FACTORY_METHOD factoryMethod = NULL_FACTORY_METHOD,
390 XMOG_THROW_METHOD throwMethod = NULL_THROW_METHOD,
391 XMOG_TOJAVA_METHOD toJavaMethod = NULL_TOJAVA_METHOD,
392 XMOG_FROMJAVA_METHOD fromJavaMethod = NULL_FROMJAVA_METHOD,
415 void *
operator new ( size_t );
421 void operator delete(
void * );
435 void has_peer_unmarshaller(
bool bHPU );
445 bool has_peer_unmarshaller()
const;
469 jclass get_jclass(
xmog_localenv * env,
bool bSuppressExceptions );
474 const char * get_class_name()
const;
552 static jint calculate_hashcode(
const char * _classNameUTF );
560 static jobject get_bootstrap_classloader(
xmog_localenv * env = NULL );
624 void throw_( jthrowable throwable, xmog_flags
flags,
int error_code = 0,
xmog_localenv * env = NULL );
637 static char * getClassName( jobject inst,
xmog_localenv * env = NULL );
645 static char * getClassClassName( jclass clazz,
xmog_localenv * env = NULL );
656 static xmog_java_class * get_exact_throwable_for(
const char * classNameUTF );
709 static jbyte calculateMaximumSupportedClassVersion();
722 static void addLocalResourceRoot(
const char * filenameUTF,
bool preferred =
false,
xmog_localenv * env = NULL );
735 static void addInMemoryResourceRoot(
const jbyte * bytes,
size_t len,
bool preferred =
false,
xmog_localenv * env = NULL );
748 static void addDirectoryJarFiles(
const char * dirnameUTF,
bool preferred =
false,
xmog_localenv * env = NULL );
887 void setInterceptor( XMOG_INTERCEPTOR icp );
890 void setOwnsClassName();
900 static int getInterceptorCount();
904 #if !defined (XMOG_LACKS_INLINE_FUNCTIONS)
905 # include "xmog_java_class.inl"