Modifier and Type | Class and Description |
---|---|
static class |
Java.ByteArrayProxyMethods |
static class |
Java.JCreateMethod |
static class |
Java.JCtorCache
Used for concrete reified classes.
|
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<? extends IRubyObject> proxyConstructor,
RubyClass clazz) |
static IRubyObject |
create_proxy_class(IRubyObject self,
IRubyObject name,
IRubyObject javaClass,
IRubyObject module)
Deprecated.
|
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 java_class) |
static IRubyObject |
get_java_class(IRubyObject self,
IRubyObject name)
Deprecated.
|
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)
Deprecated.
|
static java.lang.Class[] |
getInterfacesFromRubyClass(RubyClass klass) |
static java.lang.Class |
getJavaClass(Ruby runtime,
java.lang.String className) |
static java.lang.Class |
getJavaClass(Ruby runtime,
java.lang.String className,
boolean initialize) |
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<? extends IRubyObject> |
getRealClassConstructor(Ruby runtime,
java.lang.Class<? extends IRubyObject> proxyImplClass) |
static <T extends java.lang.reflect.AccessibleObject & java.lang.reflect.Member> |
isAccessible(T member)
Check if the given member would be accessible without using the deprecated AccessibleObject.isAccessible.
|
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 java.lang.Class |
loadJavaClass(Ruby runtime,
java.lang.String className) |
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 java.lang.Class<?> |
resolveClassType(ThreadContext context,
IRubyObject type) |
static RubyModule |
resolveType(Ruby runtime,
IRubyObject type) |
static IRubyObject |
ruby_to_java(IRubyObject recv,
IRubyObject object,
Block unusedBlock)
Deprecated.
|
static RubyModule |
setProxyClass(Ruby runtime,
RubyModule target,
java.lang.String constName,
java.lang.Class<?> javaClass) |
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 java.lang.Class<?> |
unwrapClassProxy(IRubyObject self) |
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)
@Deprecated public static IRubyObject create_proxy_class(IRubyObject self, IRubyObject name, IRubyObject javaClass, IRubyObject module)
public static RubyModule setProxyClass(Ruby runtime, RubyModule target, java.lang.String constName, java.lang.Class<?> javaClass)
@Deprecated 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)
@Deprecated 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 java_class)
public static RubyModule get_proxy_class(IRubyObject self, IRubyObject java_class)
public static java.lang.Class<?> unwrapClassProxy(IRubyObject self)
public static RubyClass getProxyClassForObject(Ruby runtime, java.lang.Object object)
public static java.lang.Class<?> resolveClassType(ThreadContext context, IRubyObject type)
public static RubyModule resolveType(Ruby runtime, IRubyObject type)
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 java.lang.Class getJavaClass(Ruby runtime, java.lang.String className) throws RaiseException
RaiseException
public static java.lang.Class getJavaClass(Ruby runtime, java.lang.String className, boolean initialize) throws RaiseException
RaiseException
public static java.lang.Class loadJavaClass(Ruby runtime, java.lang.String className) throws java.lang.ClassNotFoundException, RaiseException
java.lang.ClassNotFoundException
RaiseException
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<? extends IRubyObject> getRealClassConstructor(Ruby runtime, java.lang.Class<? extends IRubyObject> proxyImplClass)
public static IRubyObject constructProxy(Ruby runtime, java.lang.reflect.Constructor<? extends IRubyObject> 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)
public static <T extends java.lang.reflect.AccessibleObject & java.lang.reflect.Member> boolean isAccessible(T member)
Copyright © 2001-2022 JRuby. All Rights Reserved.