Modifier and Type | Class and Description |
---|---|
static class |
Java.ByteArrayProxyMethods |
static class |
Java.JCreateMethod |
static class |
Java.NewStyleExtensionInherited |
static class |
Java.OldStyleExtensionInherited |
Modifier and Type | Field and Description |
---|---|
static boolean |
NEW_STYLE_EXTENSION |
static boolean |
OBJECT_PROXY_CACHE |
Constructor and Description |
---|
Java() |
Modifier and Type | Method and Description |
---|---|
static IRubyObject |
allocateProxy(java.lang.Object javaObject,
RubyClass clazz) |
static IRubyObject |
concrete_proxy_inherited(IRubyObject clazz,
IRubyObject subclazz)
Deprecated.
|
static IRubyObject |
const_missing(ThreadContext context,
IRubyObject self,
IRubyObject name) |
static IRubyObject |
constructProxy(Ruby runtime,
java.lang.reflect.Constructor proxyConstructor,
RubyClass clazz) |
static IRubyObject |
create_proxy_class(IRubyObject self,
IRubyObject name,
IRubyObject javaClass,
IRubyObject module) |
static RubyModule |
createJavaModule(Ruby runtime) |
static java.lang.Class |
generateRealClass(RubyClass clazz) |
static IRubyObject |
get_inner_class(ThreadContext context,
RubyModule self,
IRubyObject name) |
static RubyModule |
get_interface_module(Ruby runtime,
IRubyObject javaClassObject) |
static IRubyObject |
get_java_class(IRubyObject self,
IRubyObject name) |
static IRubyObject |
get_package_module_dot_format(IRubyObject self,
IRubyObject dottedName) |
static RubyModule |
get_package_module(IRubyObject self,
IRubyObject name) |
static RubyModule |
get_proxy_class(IRubyObject self,
IRubyObject java_class) |
static IRubyObject |
get_proxy_or_package_under_package(ThreadContext context,
IRubyObject self,
IRubyObject parentPackage,
IRubyObject name) |
static IRubyObject |
get_top_level_proxy_or_package(ThreadContext context,
IRubyObject self,
IRubyObject name) |
static java.lang.reflect.Method |
getFunctionalInterfaceMethod(java.lang.Class<?> iface) |
static IRubyObject |
getInstance(Ruby runtime,
java.lang.Object rawJavaObject)
Same as Java#getInstance(runtime, rawJavaObject, false).
|
static IRubyObject |
getInstance(Ruby runtime,
java.lang.Object rawJavaObject,
boolean forceCache)
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,
java.lang.Class javaClass) |
static RubyModule |
getInterfaceModule(Ruby runtime,
JavaClass javaClass) |
static java.lang.Class[] |
getInterfacesFromRubyClass(RubyClass klass) |
static RubyModule |
getJavaPackageModule(Ruby runtime,
java.lang.Package pkg) |
static RubyModule |
getJavaPackageModule(Ruby runtime,
java.lang.String packageString) |
static RubyModule |
getProxyClass(Ruby runtime,
java.lang.Class<?> clazz) |
static RubyModule |
getProxyClass(Ruby runtime,
JavaClass javaClass) |
static RubyClass |
getProxyClassForObject(Ruby runtime,
java.lang.Object object) |
static java.lang.reflect.Constructor |
getRealClassConstructor(Ruby runtime,
java.lang.Class<?> proxyImplClass) |
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 |
method_missing(ThreadContext context,
IRubyObject self,
IRubyObject name) |
static IRubyObject |
method_missing(ThreadContext context,
IRubyObject self,
IRubyObject[] args) |
static IRubyObject |
new_proxy_instance2(IRubyObject recv,
IRubyObject wrapper,
IRubyObject ifcs,
Block block) |
static JavaObject |
newInterfaceImpl(IRubyObject wrapper,
java.lang.Class[] interfaces) |
static IRubyObject |
ruby_to_java(IRubyObject recv,
IRubyObject object,
Block unusedBlock)
Deprecated.
|
static <T extends java.lang.reflect.AccessibleObject & java.lang.reflect.Member> |
trySetAccessible(T member)
Try to set the given member to be accessible, considering open modules and avoiding the actual setAccessible
call when it would produce a JPMS warning.
|
static IRubyObject |
wrap(Ruby runtime,
IRubyObject java_object) |
static IRubyObject |
wrapJavaObject(Ruby runtime,
java.lang.Object object) |
public static final boolean NEW_STYLE_EXTENSION
public static final boolean OBJECT_PROXY_CACHE
public static RubyModule createJavaModule(Ruby runtime)
public static IRubyObject create_proxy_class(IRubyObject self, IRubyObject name, IRubyObject javaClass, IRubyObject module)
public static IRubyObject get_java_class(IRubyObject self, IRubyObject name)
public static IRubyObject getInstance(Ruby runtime, java.lang.Object rawJavaObject)
public static IRubyObject getInstance(Ruby runtime, java.lang.Object rawJavaObject, boolean forceCache)
runtime
- the JRuby runtimerawJavaObject
- the object to get a wrapper forforceCache
- whether to force the use of the proxy cacheJavaUtil.convertJavaToUsableRubyObject(org.jruby.Ruby, java.lang.Object)
public static RubyModule getInterfaceModule(Ruby runtime, JavaClass javaClass)
public static RubyModule getInterfaceModule(Ruby runtime, java.lang.Class javaClass)
public static RubyModule get_interface_module(Ruby runtime, IRubyObject javaClassObject)
public static RubyModule get_proxy_class(IRubyObject self, IRubyObject java_class)
public static RubyClass getProxyClassForObject(Ruby runtime, java.lang.Object object)
public static RubyModule getProxyClass(Ruby runtime, JavaClass javaClass)
public static RubyModule getProxyClass(Ruby runtime, java.lang.Class<?> clazz)
@Deprecated public static IRubyObject concrete_proxy_inherited(IRubyObject clazz, IRubyObject subclazz)
public static RubyModule getJavaPackageModule(Ruby runtime, java.lang.Package pkg)
public static RubyModule getJavaPackageModule(Ruby runtime, java.lang.String packageString)
public static RubyModule get_package_module(IRubyObject self, IRubyObject name)
public static IRubyObject get_package_module_dot_format(IRubyObject self, IRubyObject dottedName)
public static IRubyObject get_proxy_or_package_under_package(ThreadContext context, IRubyObject self, IRubyObject parentPackage, IRubyObject name)
public static IRubyObject get_inner_class(ThreadContext context, RubyModule self, IRubyObject name)
public static IRubyObject const_missing(ThreadContext context, IRubyObject self, IRubyObject name)
public static IRubyObject method_missing(ThreadContext context, IRubyObject self, IRubyObject name)
public static IRubyObject method_missing(ThreadContext context, IRubyObject self, IRubyObject[] args)
public static IRubyObject get_top_level_proxy_or_package(ThreadContext context, IRubyObject self, IRubyObject name)
public static IRubyObject wrap(Ruby runtime, IRubyObject java_object)
@Deprecated public static IRubyObject java_to_ruby(IRubyObject recv, IRubyObject object, Block unusedBlock)
@Deprecated public static IRubyObject ruby_to_java(IRubyObject recv, IRubyObject object, Block unusedBlock)
@Deprecated public static IRubyObject java_to_primitive(IRubyObject recv, IRubyObject object, Block unusedBlock)
public static IRubyObject new_proxy_instance2(IRubyObject recv, IRubyObject wrapper, IRubyObject ifcs, Block block)
public static JavaObject newInterfaceImpl(IRubyObject wrapper, java.lang.Class[] interfaces)
public static java.lang.Class generateRealClass(RubyClass clazz)
public static java.lang.reflect.Constructor getRealClassConstructor(Ruby runtime, java.lang.Class<?> proxyImplClass)
public static IRubyObject constructProxy(Ruby runtime, java.lang.reflect.Constructor proxyConstructor, RubyClass clazz)
public static IRubyObject allocateProxy(java.lang.Object javaObject, RubyClass clazz)
public static IRubyObject wrapJavaObject(Ruby runtime, java.lang.Object object)
public static java.lang.Class[] getInterfacesFromRubyClass(RubyClass klass)
public static java.lang.reflect.Method getFunctionalInterfaceMethod(java.lang.Class<?> iface)
iface
- public static <T extends java.lang.reflect.AccessibleObject & java.lang.reflect.Member> boolean trySetAccessible(T member)
Copyright © 2001-2019 JRuby. All Rights Reserved.