org.jruby.javasupport
Class JavaObject

java.lang.Object
  extended by org.jruby.RubyObject
      extended by org.jruby.javasupport.JavaObject
All Implemented Interfaces:
java.lang.Cloneable, IRubyObject
Direct Known Subclasses:
JavaArray, JavaClass

public class JavaObject
extends RubyObject

Author:
jpetersen

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jruby.RubyObject
RubyObject.Finalizer
 
Field Summary
 
Fields inherited from class org.jruby.RubyObject
instanceVariables, isTrue, metaClass, NEVER, OBJECT_ALLOCATOR
 
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)
           
 IRubyObject equal(IRubyObject other)
          rb_equal
 java.lang.Class getJavaClass()
          RubyMethod getJavaClass.
 java.lang.Object getValue()
           
 RubyFixnum hash()
           
 IRubyObject is_java_proxy()
           
 IRubyObject java_class()
           
 RubyString java_type()
           
 RubyFixnum length()
           
protected static void registerRubyMethods(Ruby runtime, RubyClass result)
           
 IRubyObject ruby_synchronized(Block block)
           
 IRubyObject same(IRubyObject other)
           
 IRubyObject to_s()
           
static JavaObject wrap(Ruby runtime, java.lang.Object value)
           
 
Methods inherited from class org.jruby.RubyObject
addFinalizer, anyToString, asString, asSymbol, attachToObjectSpace, callInit, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethodMissing, callMethodMissing, callSuper, checkArrayType, checkFrozen, checkStringType, compilerCallMethod, compilerCallMethodWithIndex, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToString, convertToType, convertToType, convertToType, convertToTypeWithCheck, createObjectClass, dataGetStruct, dataWrapStruct, display, doClone, dup, eql, eqlInternal, equalInternal, equals, evalSimple, evalUnder, evalWithBinding, extend, freeze, frozen, getInstanceVariable, getInstanceVariables, getInstanceVariablesSnapshot, getMetaClass, getNativeTypeIndex, getRuntime, getSingletonClass, getSingletonClassClone, getType, hashCode, id_deprecated, id, infectBy, inherited, initCopy, initialize_copy, initialize, inspect, instance_eval, instance_exec, instance_of, instance_variable_get, instance_variable_set, instance_variables, instanceVariableNames, isFalse, isFrozen, isImmediate, isKindOf, isNil, isSingleton, isTaint, isTrue, kind_of, makeMetaClass, match, method, methods, nil_p, obj_equal, private_methods, protected_methods, public_methods, puts, rbClone, remove_instance_variable, removeFinalizers, removeInstanceVariable, respond_to, respondsTo, safeGetInstanceVariables, safeHasInstanceVariables, send, setFrozen, setInstanceVariable, setInstanceVariable, setInstanceVariables, setMetaClass, setTaint, singleton_methods, specificEval, taint, tainted, testFrozen, toString, trueFalseNil, trueFalseNil, type_deprecated, type, untaint
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaObject

protected JavaObject(Ruby runtime,
                     RubyClass rubyClass,
                     java.lang.Object value)

JavaObject

protected JavaObject(Ruby runtime,
                     java.lang.Object value)
Method Detail

wrap

public static JavaObject wrap(Ruby runtime,
                              java.lang.Object value)

getJavaClass

public java.lang.Class getJavaClass()
Description copied from interface: IRubyObject
RubyMethod getJavaClass.

Specified by:
getJavaClass in interface IRubyObject
Overrides:
getJavaClass in class RubyObject
Returns:
Class

getValue

public java.lang.Object getValue()

createJavaObjectClass

public static RubyClass createJavaObjectClass(Ruby runtime,
                                              RubyModule javaModule)

registerRubyMethods

protected static void registerRubyMethods(Ruby runtime,
                                          RubyClass result)

hash

public RubyFixnum hash()
Overrides:
hash in class RubyObject

to_s

public IRubyObject to_s()
Overrides:
to_s in class RubyObject

equal

public IRubyObject equal(IRubyObject other)
Description copied from class: RubyObject
rb_equal

Specified by:
equal in interface IRubyObject
Overrides:
equal in class RubyObject

same

public IRubyObject same(IRubyObject other)

java_type

public RubyString java_type()

java_class

public IRubyObject java_class()

length

public RubyFixnum length()

aref

public IRubyObject aref(IRubyObject index)

aset

public IRubyObject aset(IRubyObject index,
                        IRubyObject someValue)

afill

public IRubyObject afill(IRubyObject beginIndex,
                         IRubyObject endIndex,
                         IRubyObject someValue)

is_java_proxy

public IRubyObject is_java_proxy()

ruby_synchronized

public IRubyObject ruby_synchronized(Block block)


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