Codemesh Runtime v3 C++ API Reference  3.9.205
xmog_java_method.h
1 //
2 // Copyright (c) 1999-2020 by Codemesh, Inc.. ALL RIGHTS RESERVED.
3 //
4 
5 
6 #ifndef xmog_java_method_inc
7 #define xmog_java_method_inc
8 
9 
10 class xmog_java_class;
11 
12 
13 #include "xmog_java_dynamic.h"
14 
15 
38 class XMOG_DECLSPEC xmog_java_method : public xmog_java_dynamic
39 {
40 private:
41 
48  jmethodID mid_;
49 
53  xmog_java_class * clazz_;
54 
60  xmog_java_method * next_;
61 
65  char * name_;
66 
70  char * type_;
71 
75  bool bStatic_;
76 
80  bool bIndirect_;
81 
82 public:
83 
84  friend class xmog_java_class;
85 
94  xmog_java_method( xmog_java_class * clazz, jmethodID mid, bool bStatic = false, bool bIndirect = false );
95 
105  xmog_java_method( xmog_java_class * clazz, const char * name, const char * type, bool bStatic = false, bool bIndirect = false );
106 
112  xmog_java_method( const xmog_java_method & rhs );
113 
114  ~xmog_java_method();
115 
120  void * operator new ( size_t );
121 
126  void operator delete( void * );
127 
131  xmog_java_method * next();
132 
136  xmog_java_class * clazz();
137 
144  const char * name();
145 
152  const char * type();
153 
157  bool is_static() const;
158 
165  void set_methodID( jmethodID mid );
166 
173  int initializeMethodID( xmog_localenv * env );
174 
178  jmethodID get_methodID();
179 
186  jobjectArray get_argument_array( xmog_java_values * values, xmog_localenv * env = NULL );
187 
196  virtual bool get_bool( xmog_base * obj, xmog_java_values * args = NULL, xmog_localenv * env = NULL, xmog_flags flags = 0 ) ;
197 
206  virtual jboolean get_jboolean( xmog_base * obj, xmog_java_values * args = NULL, xmog_localenv * env = NULL, xmog_flags flags = 0 ) ;
207 
216  virtual jbyte get_byte( xmog_base * obj, xmog_java_values * args = NULL, xmog_localenv * env = NULL, xmog_flags flags = 0 ) ;
217 
226  virtual jchar get_char( xmog_base * obj, xmog_java_values * args = NULL, xmog_localenv * env = NULL, xmog_flags flags = 0 ) ;
227 
236  virtual jdouble get_double( xmog_base * obj, xmog_java_values * args = NULL, xmog_localenv * env = NULL, xmog_flags flags = 0 ) ;
237 
246  virtual jfloat get_float( xmog_base * obj, xmog_java_values * args = NULL, xmog_localenv * env = NULL, xmog_flags flags = 0 ) ;
247 
256  virtual jint get_int( xmog_base * obj, xmog_java_values * args = NULL, xmog_localenv * env = NULL, xmog_flags flags = 0 ) ;
257 
266  virtual jlong get_long( xmog_base * obj, xmog_java_values * args = NULL, xmog_localenv * env = NULL, xmog_flags flags = 0 ) ;
267 
276  virtual jshort get_short( xmog_base * obj, xmog_java_values * args = NULL, xmog_localenv * env = NULL, xmog_flags flags = 0 ) ;
277 
286  virtual jobject get_jobject( xmog_base * obj, xmog_java_values * args = NULL, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL ) ;
287 
288  virtual void get_void( xmog_base * obj, xmog_java_values * args = NULL, xmog_localenv * env = NULL, xmog_flags flags = 0 ) ;
289 
290  virtual void set_bool( xmog_base * obj, bool b, xmog_localenv * env = NULL ) ;
291 
292  virtual void set_jboolean( xmog_base * obj, jboolean b, xmog_localenv * env = NULL ) ;
293 
294  virtual void set_byte( xmog_base * obj, jbyte b, xmog_localenv * env = NULL ) ;
295 
296  virtual void set_char( xmog_base * obj, jchar ch, xmog_localenv * env = NULL ) ;
297 
298  virtual void set_double( xmog_base * obj, jdouble d, xmog_localenv * env = NULL ) ;
299 
300  virtual void set_float( xmog_base * obj, jfloat f, xmog_localenv * env = NULL ) ;
301 
302  virtual void set_int( xmog_base * obj, jint i, xmog_localenv * env = NULL ) ;
303 
304  virtual void set_long( xmog_base * obj, jlong l, xmog_localenv * env = NULL ) ;
305 
306  virtual void set_short( xmog_base * obj, jshort sh, xmog_localenv * env = NULL ) ;
307 
308  virtual void set_jobject( xmog_base * obj, jobject o, xmog_localenv * env = NULL ) ;
309 
318  void call_remote( xmog_remote_java_value & result, int mid, xmog_base * base, xmog_java_values * args, xmog_localenv * env );
319 };
320 
321 
322 #endif /* xmog_java_method_inc */
xmog_java_dynamic::get_bool
virtual bool get_bool(xmog_base *obj, xmog_java_values *args=NULL, xmog_localenv *env=NULL, xmog_flags flags=0)=0
Returns the bool value of a dynamic proxy.
xmog_base::flags
flags
The possible flag values.
Definition: xmog_base.h:383
xmog_java_values
A helper type used to convey Java arguments around inside the framework.
Definition: xmog_java_value.h:105
xmog_java_dynamic::set_jboolean
virtual void set_jboolean(xmog_base *obj, jboolean b, xmog_localenv *env=NULL)=0
Sets a jboolean value of a dynamic instance.
xmog_java_dynamic::get_double
virtual jdouble get_double(xmog_base *obj, xmog_java_values *args=NULL, xmog_localenv *env=NULL, xmog_flags flags=0)=0
Returns the double value of a dynamic proxy.
xmog_java_dynamic::get_void
virtual void get_void(xmog_base *obj, xmog_java_values *args=NULL, xmog_localenv *env=NULL, xmog_flags flags=0)=0
Dynamically resolves a reference that evaluates to a void value.
xmog_java_dynamic::set_long
virtual void set_long(xmog_base *obj, jlong l, xmog_localenv *env=NULL)=0
Sets a long value of a dynamic instance.
xmog_java_dynamic::set_bool
virtual void set_bool(xmog_base *obj, bool b, xmog_localenv *env=NULL)=0
Sets a bool value of a dynamic instance.
xmog_java_dynamic
The baseclass for types that dynamically derive the value of Java proxy items.
Definition: xmog_java_dynamic.h:28
xmog_remote_java_value
A helper type used to convey remote Java arguments around.
Definition: xmog_java_value.h:20
xmog_java_dynamic::get_byte
virtual jbyte get_byte(xmog_base *obj, xmog_java_values *args=NULL, xmog_localenv *env=NULL, xmog_flags flags=0)=0
Returns the jbyte value of a dynamic proxy.
xmog_java_dynamic::get_long
virtual jlong get_long(xmog_base *obj, xmog_java_values *args=NULL, xmog_localenv *env=NULL, xmog_flags flags=0)=0
Returns the long value of a dynamic proxy.
xmog_java_dynamic::get_jboolean
virtual jboolean get_jboolean(xmog_base *obj, xmog_java_values *args=NULL, xmog_localenv *env=NULL, xmog_flags flags=0)=0
Returns the jboolean value of a dynamic proxy.
xmog_java_dynamic::get_short
virtual jshort get_short(xmog_base *obj, xmog_java_values *args=NULL, xmog_localenv *env=NULL, xmog_flags flags=0)=0
Returns the short value of a dynamic proxy.
xmog_java_method
A class implementing the xmog_java_dynamic interface for accessing Java methods via JNI or Codemesh's...
Definition: xmog_java_method.h:38
xmog_java_dynamic::set_int
virtual void set_int(xmog_base *obj, jint i, xmog_localenv *env=NULL)=0
Sets an int value of a dynamic instance.
xmog_base
The baseclass for all proxy types in the framework.
Definition: xmog_base.h:29
xmog_java_dynamic::set_jobject
virtual void set_jobject(xmog_base *obj, jobject o, xmog_localenv *env=NULL)=0
Sets an object reference into a dynamic instance.
xmog_java_dynamic::get_char
virtual jchar get_char(xmog_base *obj, xmog_java_values *args=NULL, xmog_localenv *env=NULL, xmog_flags flags=0)=0
Returns the jchar value of a dynamic proxy.
xmog_localenv
A class representing per-thread information for the integration runtime.
Definition: xmog_localenv.h:32
xmog_java_dynamic::get_int
virtual jint get_int(xmog_base *obj, xmog_java_values *args=NULL, xmog_localenv *env=NULL, xmog_flags flags=0)=0
Returns the int value of a dynamic proxy.
xmog_java_dynamic::set_float
virtual void set_float(xmog_base *obj, jfloat f, xmog_localenv *env=NULL)=0
Sets a float value of a dynamic instance.
xmog_java_dynamic::set_short
virtual void set_short(xmog_base *obj, jshort sh, xmog_localenv *env=NULL)=0
Sets a short value of a dynamic instance.
xmog_java_dynamic::get_jobject
virtual jobject get_jobject(xmog_base *obj, xmog_java_values *args=NULL, xmog_localenv *env=NULL, xmog_flags flags=xmog_base::GLOBAL)=0
Returns the jobject value of a dynamic proxy.
xmog_java_dynamic::set_byte
virtual void set_byte(xmog_base *obj, jbyte b, xmog_localenv *env=NULL)=0
Sets a jbyte value of a dynamic instance.
xmog_java_dynamic::set_double
virtual void set_double(xmog_base *obj, jdouble d, xmog_localenv *env=NULL)=0
Sets a double value of a dynamic instance.
xmog_java_class
A C++ wrapper for Java types.
Definition: xmog_java_class.h:31
xmog_java_dynamic::set_char
virtual void set_char(xmog_base *obj, jchar ch, xmog_localenv *env=NULL)=0
Sets a jchar value of a dynamic instance.
xmog_java_dynamic::get_float
virtual jfloat get_float(xmog_base *obj, xmog_java_values *args=NULL, xmog_localenv *env=NULL, xmog_flags flags=0)=0
Returns the float value of a dynamic proxy.

Copyright (c) 1999-2020 by Codemesh, Inc., ALL RIGHTS RESERVED.