Codemesh Runtime v3 C++ API Reference  3.9.205
xmog_java_value.h
1 //
2 // Copyright (c) 1999-2020 by Codemesh, Inc.. ALL RIGHTS RESERVED.
3 //
4 
5 
6 #ifndef xmog_java_value_inc
7 #define xmog_java_value_inc
8 
9 
10 #include "xmog.h"
11 
12 
13 typedef jvalue xmog_java_value;
14 class xmog_localenv;
15 
16 
21 {
25  xmog_java_value val;
26 
30  jclass clazz;
31 
35  jint length;
36 
40  jint type;
41 
45  void * data;
46 
50  xmog_remote_java_value() : length( 0 ), type( 0 ), data( 0 ) {}
51 
56 
61 };
62 
63 
69 {
70 public:
71 
73 
74  xmog_remote_java_exception( jobject exc, jclass type, const char * typeName = NULL, const char * msg = NULL, const char * stack = NULL );
75 
77 
79 
81 
82  jobject get_jobject() const { return exc_; }
83  jclass get_type() const { return type_; }
84  const char * get_typeName() const { return typeName_; }
85  const char * get_super_typeName( int i ) const;
86  const char * get_message() const { return msg_; }
87  const char * get_stack() const { return stack_; }
88 
89  jobject exc_;
90  jclass type_;
91  char * typeName_;
92  char * superTypeNames_;
93  char * msg_;
94  char * stack_;
95 };
96 
97 
106 {
112  jint size;
113 
117  xmog_java_value* v;
118 
122  const char * type_codes;
123 
127  xmog_java_values() { size = 0; v = NULL; }
128 
135  xmog_java_values( jint _size, xmog_java_value * _v ) { size = _size; v = _v; }
136 
144  xmog_java_values( jint _size, xmog_java_value * _v, const char * _type_codes ) { size = _size; v = _v; type_codes = _type_codes; }
145 
149  jvalue * get_values( xmog_localenv * env = NULL ) const
150  {
151  env = env; // unused
152 
153  return v;
154  }
155 
159  const char * const get_type_codes() const
160  {
161  return type_codes;
162  }
163 };
164 
165 
166 #endif /* xmog_java_value_inc */
xmog_java_values::get_values
jvalue * get_values(xmog_localenv *env=NULL) const
Returns the JNI jvalue structures that are used to invoke methods.
Definition: xmog_java_value.h:149
xmog_java_values::v
xmog_java_value * v
The array of xmog_java_value instances represented by this object.
Definition: xmog_java_value.h:117
xmog_remote_java_value::clazz
jclass clazz
The type of the instance.
Definition: xmog_java_value.h:30
xmog_java_values
A helper type used to convey Java arguments around inside the framework.
Definition: xmog_java_value.h:105
xmog_java_values::xmog_java_values
xmog_java_values(jint _size, xmog_java_value *_v)
Creates an argument holder with the specified values.
Definition: xmog_java_value.h:135
xmog_java_values::xmog_java_values
xmog_java_values(jint _size, xmog_java_value *_v, const char *_type_codes)
Creates an argument holder with the specified values.
Definition: xmog_java_value.h:144
xmog_remote_java_value::length
jint length
The length of the array.
Definition: xmog_java_value.h:35
xmog_java_values::xmog_java_values
xmog_java_values()
Creates an empty argument holder.
Definition: xmog_java_value.h:127
xmog_remote_java_value::val
xmog_java_value val
The primitive data or the handle.
Definition: xmog_java_value.h:25
xmog_java_values::type_codes
const char * type_codes
The typecodes used for remote operations.
Definition: xmog_java_value.h:122
xmog_remote_java_value
A helper type used to convey remote Java arguments around.
Definition: xmog_java_value.h:20
xmog_remote_java_value::data
void * data
The optional native data (string or array).
Definition: xmog_java_value.h:45
xmog_remote_java_exception
A utility class used to hold on to exceptions thrown on the other side.
Definition: xmog_java_value.h:68
xmog_java_values::get_type_codes
const char *const get_type_codes() const
Returns the array of typecodes.
Definition: xmog_java_value.h:159
xmog_localenv
A class representing per-thread information for the integration runtime.
Definition: xmog_localenv.h:32
xmog_remote_java_value::type
jint type
The data type.
Definition: xmog_java_value.h:40
xmog_remote_java_value::~xmog_remote_java_value
~xmog_remote_java_value()
xmog_java_values::size
jint size
The number of xmog_java_value instances in v.
Definition: xmog_java_value.h:112

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