Top Fields Constructors Methods
org.jruby.javasupport.proxy

public Class JavaProxyReflectionObject

extends RubyObject
Class Inheritance
Known Direct Subclasses
org.jruby.javasupport.proxy.JavaProxyClass, org.jruby.javasupport.proxy.JavaProxyClass.ProxyMethodImpl, org.jruby.javasupport.proxy.JavaProxyConstructor
Imports
org.jruby.Ruby, .RubyArray, .RubyBoolean, .RubyClass, .RubyFixnum, .RubyObject, .RubyString, org.jruby.anno.JRubyMethod, org.jruby.javasupport.Java, org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject

Field Summary

Inherited from org.jruby.RubyObject:
IVAR_INSPECTING_OBJECT_ALLOCATOROBJECT_ALLOCATORREIFYING_OBJECT_ALLOCATOR

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public IRubyObject
aref(IRubyObject index)
Deprecated since 10.0.

public IRubyObject
aref(ThreadContext context, IRubyObject index)

public IRubyObject
aset(IRubyObject index, IRubyObject someValue)
Deprecated since 10.0.

public IRubyObject
aset(ThreadContext context, IRubyObject index, IRubyObject someValue)

public boolean
equals(Object
object to compare
other
)

Overrides org.jruby.RubyObject.equals.

This override does not do a "checked" dispatch.

public RubyFixnum
hash(ThreadContext
the current thread context
context
)

Overrides org.jruby.RubyBasicObject.hash.

Will return the hash code of this object.

public int
hashCode()

Overrides org.jruby.RubyObject.hashCode.

This override does not do "checked" dispatch since Object usually has #hash defined.

public IRubyObject
is_java_proxy()
Deprecated since 10.0.

public IRubyObject
public IRubyObject
java_class()
Deprecated since 10.0.

public IRubyObject
public RubyString
java_type()
Deprecated since 10.0.

public RubyString
public RubyFixnum
length()
Deprecated since 10.0.

public RubyFixnum
public RubyBoolean
op_eqq(final ThreadContext context, IRubyObject obj)

Overrides org.jruby.RubyObject.op_eqq.

Implements org.jruby.runtime.builtin.IRubyObject.op_eqq.

rb_equal The Ruby "===" method is used by default in case/when statements.

public IRubyObject
op_equal(IRubyObject other)
Deprecated

public RubyBoolean
op_equal(final ThreadContext context, IRubyObject obj)

Overrides org.jruby.RubyBasicObject.op_equal.

Implements org.jruby.runtime.builtin.IRubyObject.op_equal.

rb_obj_equal Will by default use identity equality to compare objects.

protected static void
public IRubyObject
same(IRubyObject other)
Deprecated

public IRubyObject
pack-priv static RubyArray<T extends IRubyObject>
toClassArray(ThreadContext context, final Class<?>[] classes)

pack-priv final RubyArray<T extends IRubyObject>
toRubyArray(ThreadContext context, final IRubyObject[] elements)

public String
toString()

Overrides org.jruby.RubyObject.toString.

The default toString method is just a wrapper that calls the Ruby "to_s" method.

Inherited from org.jruby.RubyObject:
attachToObjectSpacecallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitconvertToTypedigdig1dig2eqlInternalequalInternalfinishObjectClassgetNativeClassIndexinspectputsspecificEvaltoRubyString

Constructor Detail

JavaProxyReflectionObjectback to summary
public JavaProxyReflectionObject(Ruby runtime, RubyClass metaClass)

Method Detail

arefback to summary
public IRubyObject aref(IRubyObject index)

Deprecated

since 10.0.

Annotations
@Deprecated
since:10.0
arefback to summary
public IRubyObject aref(ThreadContext context, IRubyObject index)
Annotations
@JRubyMethod
name:[]
asetback to summary
public IRubyObject aset(IRubyObject index, IRubyObject someValue)

Deprecated

since 10.0.

Annotations
@Deprecated
since:10.0
asetback to summary
public IRubyObject aset(ThreadContext context, IRubyObject index, IRubyObject someValue)
Annotations
@JRubyMethod
name:[]=
equalsback to summary
public boolean equals(Object other)

Overrides org.jruby.RubyObject.equals.

Doc from org.jruby.RubyObject.equals.

This override does not do a "checked" dispatch.

Parameters
other:Object

Doc from org.jruby.RubyBasicObject.equals.

object to compare

Returns:boolean

Doc from org.jruby.RubyBasicObject.equals.

true if equals

Annotations
@Override
hashback to summary
public RubyFixnum hash(ThreadContext context)

Overrides org.jruby.RubyBasicObject.hash.

Doc from org.jruby.RubyBasicObject.hash.

Will return the hash code of this object. In comparison to MRI, this method will use the Java identity hash code instead of using rb_obj_id, since the usage of id in JRuby will incur the cost of some. ObjectSpace maintenance.

Parameters
context:ThreadContext

the current thread context

Returns:RubyFixnum

the hash value

Annotations
@JRubyMethod
hashCodeback to summary
public int hashCode()

Overrides org.jruby.RubyObject.hashCode.

Doc from org.jruby.RubyObject.hashCode.

This override does not do "checked" dispatch since Object usually has #hash defined.

Returns:int

the hash code

Annotations
@Override
is_java_proxyback to summary
public IRubyObject is_java_proxy()

Deprecated

since 10.0.

Annotations
@Deprecated
since:10.0
is_java_proxyback to summary
public IRubyObject is_java_proxy(ThreadContext context)
Annotations
@JRubyMethod
name:java_proxy?
java_classback to summary
public IRubyObject java_class()

Deprecated

since 10.0.

Annotations
@Deprecated
since:10.0
java_classback to summary
public IRubyObject java_class(ThreadContext context)
Annotations
@JRubyMethod
java_typeback to summary
public RubyString java_type()

Deprecated

since 10.0.

Annotations
@Deprecated
since:10.0
java_typeback to summary
public RubyString java_type(ThreadContext context)
Annotations
@JRubyMethod
lengthback to summary
public RubyFixnum length()

Deprecated

since 10.0.

Annotations
@Deprecated
since:10.0
lengthback to summary
public RubyFixnum length(ThreadContext context)
Annotations
@JRubyMethod
op_eqqback to summary
public RubyBoolean op_eqq(final ThreadContext context, IRubyObject obj)

Overrides org.jruby.RubyObject.op_eqq.

Implements org.jruby.runtime.builtin.IRubyObject.op_eqq.

Doc from org.jruby.RubyObject.op_eqq.

rb_equal The Ruby "===" method is used by default in case/when statements. The Object implementation first checks Java identity equality and then calls the "==" method too.

Annotations
@Override
@JRubyMethod
name:==, eql?
op_equalback to summary
public IRubyObject op_equal(IRubyObject other)

Deprecated

Annotations
@Deprecated
op_equalback to summary
public RubyBoolean op_equal(final ThreadContext context, IRubyObject obj)

Overrides org.jruby.RubyBasicObject.op_equal.

Implements org.jruby.runtime.builtin.IRubyObject.op_equal.

Doc from org.jruby.RubyBasicObject.op_equal.

rb_obj_equal Will by default use identity equality to compare objects. This follows the Ruby semantics. The name of this method doesn't follow the convention because hierarchy problems

Annotations
@Override
@JRubyMethod
name:equal?
registerRubyMethodsback to summary
protected static void registerRubyMethods(ThreadContext context, RubyClass klass)
sameback to summary
public IRubyObject same(IRubyObject other)

Deprecated

Annotations
@Deprecated
to_sback to summary
public IRubyObject to_s(ThreadContext context)

Overrides org.jruby.RubyBasicObject.to_s.

Annotations
@Override
@JRubyMethod
toClassArrayback to summary
pack-priv static RubyArray<T extends IRubyObject> toClassArray(ThreadContext context, final Class<?>[] classes)
toRubyArrayback to summary
pack-priv final RubyArray<T extends IRubyObject> toRubyArray(ThreadContext context, final IRubyObject[] elements)
toStringback to summary
public String toString()

Overrides org.jruby.RubyObject.toString.

Doc from org.jruby.RubyObject.toString.

The default toString method is just a wrapper that calls the Ruby "to_s" method.

Returns:String

string representation

Annotations
@Override