Top Level Namespace
Defined Under Namespace
Modules: Kernel, Rjb, RjbConf Classes: JavaPackage
Class Method Summary (collapse)
-
+ (Object) class_eval
Rjb's class is not Class but Object, so add class_eval for the Java class.
- + (Object) ctor_sigs
- + (Object) new
-
+ (Object) new_with_sig
new instance with signature.
- + (Object) sigs
- + (Object) static_sigs
Instance Method Summary (collapse)
-
- (Object) _classname
return class name.
- - (Object) _invoke
- - (Object) _prepare_proxy
- - (Object) impl
- - (Object) initialize
- - (Object) java
- - (Object) method_missing
- - (Object) org
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
- (Object) method_missing
Class Method Details
+ (Object) class_eval
Rjb's class is not Class but Object, so add class_eval for the Java class.
|
|
# File 'ext/rjb.c'
static VALUE rjb_class_eval(int argc, VALUE* argv, VALUE self)
{
if (rb_block_given_p())
{
rb_ivar_set(self, user_initialize, rb_block_proc());
}
|
+ (Object) ctor_sigs
+ (Object) new
+ (Object) new_with_sig
new instance with signature
|
|
# File 'ext/rjb.c'
static VALUE rjb_newinstance_s(int argc, VALUE* argv, VALUE self)
{
VALUE vsig, rest;
char* sig;
VALUE ret = Qnil;
struct jv_data* ptr;
int found = 0;
JNIEnv* jenv = rjb_prelude();
rb_scan_args(argc, argv, "1*", &vsig, &rest);
sig = StringValueCStr(vsig);
Data_Get_Struct(self, struct jv_data, ptr);
if (ptr->constructors)
{
struct cls_constructor** pc = ptr->constructors;
for (pc = ptr->constructors; *pc; pc++)
{
if ((*pc)->arg_count == argc - 1
&& !strcmp(sig, (*pc)->method_signature))
{
found = 1;
ret = createinstance(jenv, argc - 1, argv + 1, self, *pc);
break;
}
|
+ (Object) sigs
+ (Object) static_sigs
Instance Method Details
- (Object) _classname
return class name
|
|
# File 'ext/rjb.c'
static VALUE rjb_i_class(VALUE self)
{
JNIEnv* jenv = rjb_attach_current_thread();
struct jvi_data* ptr;
jstring nm;
Data_Get_Struct(self, struct jvi_data, ptr);
nm = (*jenv)->CallObjectMethod(jenv, ptr->klass, rjb_class_getName);
rjb_check_exception(jenv, 0);
return jstring2val(jenv, nm);
}
|
- (Object) _invoke
- (Object) _prepare_proxy
- (Object) impl
- (Object) initialize
- (Object) java
126 127 128 |
# File 'lib/rjbextension.rb', line 126 def java RjbConf::JAVA end |
- (Object) org
122 123 124 |
# File 'lib/rjbextension.rb', line 122 def org RjbConf::ORG end |