|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.RubyBasicObject
org.jruby.RubyObject
org.jruby.javasupport.JavaObject
public class JavaObject
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jruby.RubyObject |
---|
RubyObject.Data |
Nested classes/interfaces inherited from class org.jruby.RubyBasicObject |
---|
RubyBasicObject.Finalizer |
Field Summary |
---|
Fields inherited from class org.jruby.RubyObject |
---|
OBJECT_ALLOCATOR, REIFYING_OBJECT_ALLOCATOR |
Fields inherited from class org.jruby.RubyBasicObject |
---|
ALL_F, BASICOBJECT_ALLOCATOR, COMPARE_BY_IDENTITY_F, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, metaClass, NEVER, NIL_F, TAINTED_F, UNDEF, UNTRUSTED_F, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F, USER8_F |
Fields inherited from interface org.jruby.runtime.builtin.IRubyObject |
---|
NULL_ARRAY |
Constructor Summary | |
---|---|
protected |
JavaObject(Ruby runtime,
java.lang.Object value)
|
protected |
JavaObject(Ruby runtime,
RubyClass rubyClass,
java.lang.Object value)
|
Method Summary | |
---|---|
IRubyObject |
afill(IRubyObject beginIndex,
IRubyObject endIndex,
IRubyObject someValue)
|
IRubyObject |
aref(IRubyObject index)
|
IRubyObject |
aset(IRubyObject index,
IRubyObject someValue)
|
static RubyClass |
createJavaObjectClass(Ruby runtime,
RubyModule javaModule)
|
java.lang.Object |
dataGetStruct()
Our version of Data_Get_Struct. |
void |
dataWrapStruct(java.lang.Object object)
Our version of Data_Wrap_Struct. |
boolean |
equals(java.lang.Object other)
This method is just a wrapper around the Ruby "==" method, provided so that RubyObjects can be used as keys in the Java HashMap object underlying RubyHash. |
java.lang.Class<?> |
getJavaClass()
Will return the Java interface that most closely can represent this object, when working through JAva integration translations. |
java.lang.Object |
getValue()
|
RubyFixnum |
hash()
rb_obj_id Will return the hash code of this object. |
int |
hashCode()
Override the Object#hashCode method to make sure that the Ruby hash is actually used as the hashcode for Ruby objects. |
IRubyObject |
is_java_proxy()
|
IRubyObject |
java_class()
|
RubyString |
java_type()
|
RubyFixnum |
length()
|
IRubyObject |
marshal_dump()
|
IRubyObject |
marshal_load(ThreadContext context,
IRubyObject str)
|
IRubyObject |
op_equal(IRubyObject other)
|
static IRubyObject |
op_equal(JavaProxy self,
IRubyObject other)
|
protected static void |
registerRubyMethods(Ruby runtime,
RubyClass result)
|
IRubyObject |
ruby_synchronized(ThreadContext context,
Block block)
|
static IRubyObject |
ruby_synchronized(ThreadContext context,
java.lang.Object lock,
Block block)
|
IRubyObject |
same(IRubyObject other)
|
IRubyObject |
to_s()
rb_any_to_s call-seq: obj.to_s => string Returns a string representing obj. |
static IRubyObject |
to_s(Ruby runtime,
java.lang.Object dataStruct)
|
java.lang.Object |
toJava(java.lang.Class cls)
Convert the object to the specified Java class, if possible. |
static JavaObject |
wrap(Ruby runtime,
java.lang.Object value)
|
static IRubyObject |
wrap(ThreadContext context,
IRubyObject self,
IRubyObject object)
|
Methods inherited from class org.jruby.RubyObject |
---|
attachToObjectSpace, callInit, callInit, callInit, callInit, callInit, convertToType, createObjectClass, eqlInternal, equalInternal, getNativeTypeIndex, initialize, op_eqq, puts, specificEval, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected JavaObject(Ruby runtime, RubyClass rubyClass, java.lang.Object value)
protected JavaObject(Ruby runtime, java.lang.Object value)
Method Detail |
---|
public java.lang.Object dataGetStruct()
IRubyObject
dataGetStruct
in interface IRubyObject
dataGetStruct
in class RubyBasicObject
IRubyObject.dataGetStruct()
public void dataWrapStruct(java.lang.Object object)
IRubyObject
dataWrapStruct
in interface IRubyObject
dataWrapStruct
in class RubyBasicObject
object
- the object to wraporg.jruby.runtime.builtin.IRubyObject#dataWrapStruct()
public static JavaObject wrap(Ruby runtime, java.lang.Object value)
public static IRubyObject wrap(ThreadContext context, IRubyObject self, IRubyObject object)
public java.lang.Class<?> getJavaClass()
RubyBasicObject
getJavaClass
in interface IRubyObject
getJavaClass
in class RubyBasicObject
public java.lang.Object getValue()
public static RubyClass createJavaObjectClass(Ruby runtime, RubyModule javaModule)
protected static void registerRubyMethods(Ruby runtime, RubyClass result)
public boolean equals(java.lang.Object other)
RubyObject
equals
in class RubyObject
public int hashCode()
RubyObject
hashCode
in class RubyObject
public RubyFixnum hash()
RubyBasicObject
hash
in class RubyBasicObject
public IRubyObject to_s()
RubyBasicObject
to_s
prints the object's class and an encoding of the
object id. As a special case, the top-level object that is the
initial execution context of Ruby programs returns ``main.''
to_s
in class RubyBasicObject
public static IRubyObject to_s(Ruby runtime, java.lang.Object dataStruct)
public IRubyObject op_equal(IRubyObject other)
public static IRubyObject op_equal(JavaProxy self, IRubyObject other)
public IRubyObject same(IRubyObject other)
public RubyString java_type()
public IRubyObject java_class()
public RubyFixnum length()
public IRubyObject aref(IRubyObject index)
public IRubyObject aset(IRubyObject index, IRubyObject someValue)
public IRubyObject afill(IRubyObject beginIndex, IRubyObject endIndex, IRubyObject someValue)
public IRubyObject is_java_proxy()
public IRubyObject ruby_synchronized(ThreadContext context, Block block)
public static IRubyObject ruby_synchronized(ThreadContext context, java.lang.Object lock, Block block)
public IRubyObject marshal_dump()
public IRubyObject marshal_load(ThreadContext context, IRubyObject str)
public java.lang.Object toJava(java.lang.Class cls)
IRubyObject
toJava
in interface IRubyObject
toJava
in class RubyBasicObject
cls
- The target type to which the object should be converted.IRubyObject.toJava
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |