org.jruby.javasupport
Class Java

java.lang.Object
  extended by org.jruby.javasupport.Java
All Implemented Interfaces:
Library

public class Java
extends java.lang.Object
implements Library


Nested Class Summary
static class Java.JavaProxyClassMethods
           
 
Constructor Summary
Java()
           
 
Method Summary
static IRubyObject concrete_proxy_inherited(IRubyObject recv, IRubyObject subclass)
           
static IRubyObject create_proxy_class(IRubyObject recv, IRubyObject constant, IRubyObject javaClass, IRubyObject module)
           
static RubyModule createJavaModule(Ruby runtime)
           
static IRubyObject get_interface_module(Ruby runtime, IRubyObject javaClassObject)
           
static IRubyObject get_java_class(IRubyObject recv, IRubyObject name)
           
static IRubyObject get_package_module_dot_format(IRubyObject recv, IRubyObject dottedName)
           
static IRubyObject get_package_module(IRubyObject recv, IRubyObject symObject)
           
static IRubyObject get_proxy_class(IRubyObject recv, IRubyObject java_class_object)
           
static IRubyObject get_proxy_or_package_under_package(ThreadContext context, IRubyObject recv, IRubyObject parentPackage, IRubyObject sym)
           
static IRubyObject get_top_level_proxy_or_package(ThreadContext context, IRubyObject recv, IRubyObject sym)
           
static IRubyObject getInstance(Ruby runtime, java.lang.Object rawJavaObject)
          Returns a new proxy instance of a type corresponding to rawJavaObject's class, or the cached proxy if we've already seen this object.
static RubyModule getInterfaceModule(Ruby runtime, JavaClass javaClass)
           
static java.lang.reflect.Method getMethodFromClass(Ruby runtime, java.lang.Class jclass, java.lang.String name, java.lang.Class... argTypes)
           
static RubyModule getProxyClass(Ruby runtime, JavaClass javaClass)
           
static IRubyObject java_to_primitive(IRubyObject recv, IRubyObject object, Block unusedBlock)
          Deprecated. 
static IRubyObject java_to_ruby(IRubyObject recv, IRubyObject object, Block unusedBlock)
          Deprecated. 
 void load(Ruby runtime, boolean wrap)
           
static IRubyObject new_proxy_instance(IRubyObject recv, IRubyObject[] args, Block block)
          Deprecated. 
static IRubyObject new_proxy_instance2(IRubyObject recv, IRubyObject wrapper, IRubyObject ifcs, Block block)
           
static IRubyObject ruby_to_java(IRubyObject recv, IRubyObject object, Block unusedBlock)
          Deprecated. 
static IRubyObject wrap(Ruby runtime, IRubyObject java_object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Java

public Java()
Method Detail

load

public void load(Ruby runtime,
                 boolean wrap)
          throws java.io.IOException
Specified by:
load in interface Library
Throws:
java.io.IOException

createJavaModule

public static RubyModule createJavaModule(Ruby runtime)

create_proxy_class

public static IRubyObject create_proxy_class(IRubyObject recv,
                                             IRubyObject constant,
                                             IRubyObject javaClass,
                                             IRubyObject module)

get_java_class

public static IRubyObject get_java_class(IRubyObject recv,
                                         IRubyObject name)

getInstance

public static IRubyObject getInstance(Ruby runtime,
                                      java.lang.Object rawJavaObject)
Returns a new proxy instance of a type corresponding to rawJavaObject's class, or the cached proxy if we've already seen this object. Note that primitives and strings are not coerced to corresponding Ruby types; use JavaUtil.convertJavaToUsableRubyObject to get coerced types or proxies as appropriate.

Parameters:
runtime -
rawJavaObject -
Returns:
the new or cached proxy for the specified Java object
See Also:
JavaUtil.convertJavaToUsableRubyObject

getInterfaceModule

public static RubyModule getInterfaceModule(Ruby runtime,
                                            JavaClass javaClass)

get_interface_module

public static IRubyObject get_interface_module(Ruby runtime,
                                               IRubyObject javaClassObject)

getProxyClass

public static RubyModule getProxyClass(Ruby runtime,
                                       JavaClass javaClass)

get_proxy_class

public static IRubyObject get_proxy_class(IRubyObject recv,
                                          IRubyObject java_class_object)

getMethodFromClass

public static java.lang.reflect.Method getMethodFromClass(Ruby runtime,
                                                          java.lang.Class jclass,
                                                          java.lang.String name,
                                                          java.lang.Class... argTypes)

concrete_proxy_inherited

public static IRubyObject concrete_proxy_inherited(IRubyObject recv,
                                                   IRubyObject subclass)

get_package_module

public static IRubyObject get_package_module(IRubyObject recv,
                                             IRubyObject symObject)

get_package_module_dot_format

public static IRubyObject get_package_module_dot_format(IRubyObject recv,
                                                        IRubyObject dottedName)

get_proxy_or_package_under_package

public static IRubyObject get_proxy_or_package_under_package(ThreadContext context,
                                                             IRubyObject recv,
                                                             IRubyObject parentPackage,
                                                             IRubyObject sym)

get_top_level_proxy_or_package

public static IRubyObject get_top_level_proxy_or_package(ThreadContext context,
                                                         IRubyObject recv,
                                                         IRubyObject sym)

wrap

public static IRubyObject wrap(Ruby runtime,
                               IRubyObject java_object)

java_to_ruby

@Deprecated
public static IRubyObject java_to_ruby(IRubyObject recv,
                                                  IRubyObject object,
                                                  Block unusedBlock)
Deprecated. 

High-level object conversion utility function 'java_to_primitive' is the low-level version


ruby_to_java

@Deprecated
public static IRubyObject ruby_to_java(IRubyObject recv,
                                                  IRubyObject object,
                                                  Block unusedBlock)
Deprecated. 

High-level object conversion utility.


java_to_primitive

@Deprecated
public static IRubyObject java_to_primitive(IRubyObject recv,
                                                       IRubyObject object,
                                                       Block unusedBlock)
Deprecated. 


new_proxy_instance

@Deprecated
public static IRubyObject new_proxy_instance(IRubyObject recv,
                                                        IRubyObject[] args,
                                                        Block block)
Deprecated. 


new_proxy_instance2

public static IRubyObject new_proxy_instance2(IRubyObject recv,
                                              IRubyObject wrapper,
                                              IRubyObject ifcs,
                                              Block block)


Copyright © 2002-2009 JRuby Team. All Rights Reserved.