Wrapper interface of RubyObjectAdapter for embedding. Methods' arguments can have simple Java objects for easiness. Each methods converts returned object to a Java type specified in the argument.
callMethod(Object receiver, String methodName, Object[] args)Executes a method defined in Ruby script.
| name | type | description |
|---|---|---|
| receiver | Object | is an instance that will receive this method call |
| method_name | String | is a method name to be called |
| args | Object[] | are method arguments. |
Returns: an instance automatically converted from Ruby to Java
callMethod(Object receiver, String methodName, org.jruby.runtime.Block block, Object[] args)Executes a method defined in Ruby script. This method is used when a Ruby method has a block in its arguments.
| name | type | description |
|---|---|---|
| receiver | Object | is an instance that will receive this method call |
| method_name | String | is a method name to be called |
| block | org.jruby.runtime.Block | is a block to be executed in this method |
| args | Object[] | is an array of method arguments except a block |
Returns: an instance of automatically converted Java type
callMethod(Object receiver, String methodName, Class<T> returnType)Executes a method defined in Ruby script. This method is used when a Ruby method does not have any argument.
| name | type | description |
|---|---|---|
| receiver | Object | is an instance that will receive this method call |
| method_name | String | is a method name to be called |
| return_type | Class<T> | is the type we want it to convert to |
Returns: an instance of requested Java type
callMethod(Object receiver, String methodName, Object singleArg, Class<T> returnType)Executes a method defined in Ruby script. This method is used when a Ruby method have only one argument.
| name | type | description |
|---|---|---|
| receiver | Object | is an instance that will receive this method call |
| method_name | String | is a method name to be called |
| single_arg | Object | is an method argument |
| return_type | Class<T> | returnType is the type we want it to convert to |
Returns: an instance of requested Java type
callMethod(Object receiver, String methodName, Object[] args, Class<T> returnType)Executes a method defined in Ruby script. This method is used when a Ruby method have multiple arguments.
| name | type | description |
|---|---|---|
| receiver | Object | is an instance that will receive this method call |
| method_name | String | is a method name to be called |
| args | Object[] | is an array of method arguments |
| return_type | Class<T> | is the type we want it to convert to |
Returns: an instance of requested Java type
callMethod(Object receiver, String methodName, Object[] args, org.jruby.runtime.Block block, Class<T> returnType)Executes a method defined in Ruby script. This method is used when a Ruby method have multiple arguments, one of which is a block.
| name | type | description |
|---|---|---|
| receiver | Object | is an instance that will receive this method call |
| method_name | String | is a method name to be called |
| args | Object[] | is an array of method arguments except a block |
| block | org.jruby.runtime.Block | is a block to be executed in this method |
| return_type | Class<T> | is the type we want it to convert to |
Returns: an instance of requested Java type
callMethod(Object receiver, String methodName, Class<T> returnType, org.jruby.embed.EmbedEvalUnit unit)Executes a method defined in Ruby script. This method is used when a Ruby method does not have any argument, and users want to inject Ruby's local variables' values from Java.
| name | type | description |
|---|---|---|
| receiver | Object | is an instance that will receive this method call |
| method_name | String | is a method name to be called |
| return_type | Class<T> | is the type we want it to convert to |
| unit | org.jruby.embed.EmbedEvalUnit | is parsed unit |
Returns: an instance of requested Java type
callMethod(Object receiver, String methodName, Object[] args, Class<T> returnType, org.jruby.embed.EmbedEvalUnit unit)Executes a method defined in Ruby script. This method is used when a Ruby method have multiple arguments, and users want to inject Ruby's local variables' values from Java.
| name | type | description |
|---|---|---|
| receiver | Object | is an instance that will receive this method call |
| method_name | String | is a method name to be called |
| args | Object[] | is an array of method arguments |
| return_type | Class<T> | is the type we want it to convert to |
| unit | org.jruby.embed.EmbedEvalUnit | is parsed unit |
Returns: an instance of requested Java type
callMethod(Object receiver, String methodName, Object[] args, org.jruby.runtime.Block block, Class<T> returnType, org.jruby.embed.EmbedEvalUnit unit)Executes a method defined in Ruby script. This method is used when a Ruby method have multiple arguments, one of which is a block, and users want to inject Ruby's local variables' values from Java.
| name | type | description |
|---|---|---|
| receiver | Object | is an instance that will receive this method call |
| method_name | String | is a method name to be called |
| args | Object[] | is an array of method arguments except a block |
| block | org.jruby.runtime.Block | is a block to be executed in this method |
| return_type | Class<T> | is the type we want it to convert to |
| unit | org.jruby.embed.EmbedEvalUnit | is parsed unit |
Returns: is the type we want it to convert to
callSuper(Object receiver, Object[] args, Class<T> returnType)| name | type | description |
|---|---|---|
| receiver | Object | is an instance that will receive this method call |
| args | Object[] | is an array of method arguments |
| return_type | Class<T> | is the type we want it to convert to |
Returns: is the type we want it to convert to
callSuper(Object receiver, Object[] args, org.jruby.runtime.Block block, Class<T> returnType)| name | type | description |
|---|---|---|
| receiver | Object | is an instance that will receive this method call |
| args | Object[] | is an array of method arguments except a block |
| block | org.jruby.runtime.Block | is a block to be executed in this method |
| return_type | Class<T> | is the type we want it to convert to |
Returns: is the type we want it to convert to
runRubyMethod(Class<T> returnType, Object receiver, String methodName, org.jruby.runtime.Block block, Object[] args)Executes a method defined in Ruby script.
| name | type | description |
|---|---|---|
| return_type | Class<T> | is the type we want it to convert to |
| receiver | Object | is an instance that will receive this method call. The receiver can be null or other Java objects. The null will be converted to RubyNil or wrapped in RubyObject. |
| method_name | String | is a method name to be called |
| block | org.jruby.runtime.Block | is an optional Block object. Send null for no block. |
| args | Object[] | is an array of method arguments |
Returns: an instance of requested Java type
callMethod(org.jruby.runtime.builtin.IRubyObject receiver, String methodName)callMethod(org.jruby.runtime.builtin.IRubyObject receiver, String methodName, org.jruby.runtime.builtin.IRubyObject singleArg)callMethod(org.jruby.runtime.builtin.IRubyObject receiver, String methodName, org.jruby.runtime.builtin.IRubyObject[] args)callMethod(org.jruby.runtime.builtin.IRubyObject receiver, String methodName, org.jruby.runtime.builtin.IRubyObject[] args, org.jruby.runtime.Block block)callSuper(org.jruby.runtime.builtin.IRubyObject receiver, org.jruby.runtime.builtin.IRubyObject[] args)callSuper(org.jruby.runtime.builtin.IRubyObject receiver, org.jruby.runtime.builtin.IRubyObject[] args, org.jruby.runtime.Block block)convertToJavaArray(org.jruby.runtime.builtin.IRubyObject array)convertToRubyInteger(org.jruby.runtime.builtin.IRubyObject obj)convertToRubyString(org.jruby.runtime.builtin.IRubyObject obj)getInstanceVariable(org.jruby.runtime.builtin.IRubyObject obj, String variableName)isKindOf(org.jruby.runtime.builtin.IRubyObject value, org.jruby.RubyModule rubyModule)setInstanceVariable(org.jruby.runtime.builtin.IRubyObject obj, String variableName, org.jruby.runtime.builtin.IRubyObject value)