| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final ObjectAllocator | IVAR_INSPECTING_OBJECT_ALLOCATOR
Allocator that inspects all methods for instance variables and chooses a concrete class to construct based on that. |
| public static final ObjectAllocator | OBJECT_ALLOCATOR
Default allocator instance for all Ruby objects. |
| public static final ObjectAllocator |
| Access | Constructor and Description |
|---|---|
| public | RubyObject(Ruby
the runtime runtime, RubyClass the metaclass metaClass)Standard path for object creation. |
| public | |
| protected | RubyObject(Ruby runtime, RubyClass metaClass, boolean useObjectSpace, boolean canBeTainted)
Deprecated
|
| protected | RubyObject(Ruby
the runtime runtime, RubyClass the metaclass metaClass, boolean to enable object space useObjectSpace)Path for objects who want to decide whether they don't want to be in ObjectSpace even when it is on. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public final void | callInit(IRubyObject[]
args args, Block block block)Call the Ruby initialize method with the supplied arguments and block. |
| public final void | |
| public final void | callInit(IRubyObject
arg0 arg0, Block block block)Call the Ruby initialize method with the supplied arguments and block. |
| public final void | callInit(IRubyObject
arg0 arg0, IRubyObject arg1 arg1, Block block block)Call the Ruby initialize method with the supplied arguments and block. |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final IRubyObject | |
| public static IRubyObject | |
| public static IRubyObject | |
| public static IRubyObject | |
| protected static boolean | Returns: true if eqlthe thread context context, final IRubyObject first comparator a, final IRubyObject second comparator b)Hides org. Helper method for checking equality, first using Java identity equality, and then calling the "eql?" method. |
| public static boolean | Returns: true if equalthe thread context context, final IRubyObject first comparator a, final IRubyObject second comparator b)Hides org. Helper method for checking equality, first using Java identity equality, and then calling the "==" method. |
| public boolean | equals(Object
object to compare other)Overrides org. This override does not do a "checked" dispatch. |
| private static boolean | |
| public static void | finishObjectClass(RubyClass
the object claass Object)Will create the Ruby class Object in the runtime specified. |
| public ClassIndex | getNativeClassIndex()
Overrides org. Implements org. This is overridden in the other concrete Java builtins to provide a fast way to determine what type they are. |
| public int | Returns: the hash codeOverrides org. This override does not do "checked" dispatch since Object usually has #hash defined. |
| public static RubyString | Returns: the stringthe thread context context, IRubyObject the object to inspect object)rb_inspect The internal helper that ensures a RubyString instance is returned so dangerous casting can be omitted Preferred over callMethod(context, "inspect") |
| private static boolean | |
| private static boolean | |
| private static boolean | |
| public IRubyObject | op_eqq(ThreadContext context, IRubyObject other)
Overrides org. Implements org. rb_equal The Ruby "===" method is used by default in case/when statements. |
| public static void | |
| private void | readObject(ObjectInputStream in)
Hides org. Tries to support Java unserialization of Ruby objects. |
| private static IRubyObject | Returns: a new instance of the now-reified classthe current runtime runtime, RubyClass the target Ruby class klass)Reify the class and allocate an instance. |
| private static JavaSites. | sites(ThreadContext context)
Hides org. Retrieve the call sites for this class. |
| public IRubyObject | specificEval(ThreadContext context, RubyModule mod, IRubyObject[] args, Block block, EvalType evalType)
Deprecated
|
| public RubyString | Returns: the string.thread context this is executing on. context)The default toString method is just a wrapper that calls the Ruby "to_s" method. |
| public String | Returns: string representationOverrides java. The default toString method is just a wrapper that calls the Ruby "to_s" method. |
| private void | writeObject(ObjectOutputStream out)
Hides org. Tries to support Java serialization of Ruby objects. |
| IVAR_INSPECTING_OBJECT_ALLOCATOR | back to summary |
|---|---|
| public static final ObjectAllocator IVAR_INSPECTING_OBJECT_ALLOCATOR Allocator that inspects all methods for instance variables and chooses a concrete class to construct based on that. This allows using specialized subclasses to hold instance variables in fields rather than always holding them in an array. | |
| OBJECT_ALLOCATOR | back to summary |
|---|---|
| public static final ObjectAllocator OBJECT_ALLOCATOR Default allocator instance for all Ruby objects. The only reason to not use this allocator is if you actually need to have all instances of something be a subclass of RubyObject.
| |
| REIFYING_OBJECT_ALLOCATOR | back to summary |
|---|---|
| public static final ObjectAllocator REIFYING_OBJECT_ALLOCATOR | |
| RubyObject | back to summary |
|---|---|
| public RubyObject(Ruby runtime, RubyClass metaClass) Standard path for object creation. Objects are entered into ObjectSpace only if ObjectSpace is enabled. | |
| RubyObject | back to summary |
|---|---|
| public RubyObject(RubyClass metaClass) Path for objects that don't enter objectspace.
| |
| RubyObject | back to summary |
|---|---|
| protected RubyObject(Ruby runtime, RubyClass metaClass, boolean useObjectSpace, boolean canBeTainted)
Deprecated
| |
| RubyObject | back to summary |
|---|---|
| protected RubyObject(Ruby runtime, RubyClass metaClass, boolean useObjectSpace) Path for objects who want to decide whether they don't want to be in ObjectSpace even when it is on. (notably used by objects being considered immediate, they'll always pass false here) | |
| attachToObjectSpace | back to summary |
|---|---|
| public void attachToObjectSpace() Will make sure that this object is added to the current object space.
| |
| callInit | back to summary |
|---|---|
| public final void callInit(IRubyObject[] args, Block block) Call the Ruby initialize method with the supplied arguments and block.
| |
| callInit | back to summary |
|---|---|
| public final void callInit(Block block) Call the Ruby initialize method with the supplied arguments and block.
| |
| callInit | back to summary |
|---|---|
| public final void callInit(IRubyObject arg0, Block block) Call the Ruby initialize method with the supplied arguments and block.
| |
| callInit | back to summary |
|---|---|
| public final void callInit(IRubyObject arg0, IRubyObject arg1, Block block) Call the Ruby initialize method with the supplied arguments and block.
| |
| callInit | back to summary |
|---|---|
| public final void callInit(IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block) | |
| callInit | back to summary |
|---|---|
| public final void callInit(ThreadContext context, IRubyObject[] args, Block block) | |
| callInit | back to summary |
|---|---|
| public final void callInit(ThreadContext context, Block block) | |
| callInit | back to summary |
|---|---|
| public final void callInit(ThreadContext context, IRubyObject arg0, Block block) | |
| callInit | back to summary |
|---|---|
| public final void callInit(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block) | |
| callInit | back to summary |
|---|---|
| public final void callInit(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block) | |
| convertToType | back to summary |
|---|---|
| public final IRubyObject convertToType(RubyClass target, int convertMethodIndex)
Deprecated
| |
| dig | back to summary |
|---|---|
| public static IRubyObject dig(ThreadContext context, IRubyObject obj, IRubyObject[] args, int idx) | |
| dig1 | back to summary |
|---|---|
| public static IRubyObject dig1(ThreadContext context, IRubyObject obj, IRubyObject arg1) | |
| dig2 | back to summary |
|---|---|
| public static IRubyObject dig2(ThreadContext context, IRubyObject obj, IRubyObject arg1, IRubyObject arg2) | |
| eqlInternal | back to summary |
|---|---|
| protected static boolean eqlInternal(final ThreadContext context, final IRubyObject a, final IRubyObject b) Hides org. Helper method for checking equality, first using Java identity equality, and then calling the "eql?" method.
| |
| equalInternal | back to summary |
|---|---|
| public static boolean equalInternal(final ThreadContext context, final IRubyObject a, final IRubyObject b) Hides org. Helper method for checking equality, first using Java identity equality, and then calling the "==" method.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides org. This override does not do a "checked" dispatch.
| |
| fastNumEqualInternal | back to summary |
|---|---|
| private static boolean fastNumEqualInternal(final ThreadContext context, final IRubyObject a, final IRubyObject b) | |
| finishObjectClass | back to summary |
|---|---|
| public static void finishObjectClass(RubyClass Object) Will create the Ruby class Object in the runtime specified. This method needs to take the actual class as an argument because of the Object class' central part in runtime initialization.
| |
| getNativeClassIndex | back to summary |
|---|---|
| public ClassIndex getNativeClassIndex() Overrides org. Implements org. This is overridden in the other concrete Java builtins to provide a fast way to determine what type they are. Will generally return a value from org.jruby.runtime.ClassIndex
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides org. This override does not do "checked" dispatch since Object usually has #hash defined.
| |
| inspect | back to summary |
|---|---|
| public static RubyString inspect(ThreadContext context, IRubyObject object) rb_inspect The internal helper that ensures a RubyString instance is returned so dangerous casting can be omitted Preferred over callMethod(context, "inspect")
| |
| isArrayDig | back to summary |
|---|---|
| private static boolean isArrayDig(IRubyObject obj, JavaSites. | |
| isHashDig | back to summary |
|---|---|
| private static boolean isHashDig(IRubyObject obj, JavaSites. | |
| isStructDig | back to summary |
|---|---|
| private static boolean isStructDig(IRubyObject obj, JavaSites. | |
| op_eqq | back to summary |
|---|---|
| public IRubyObject op_eqq(ThreadContext context, IRubyObject other) Overrides org. Implements org. 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.
| |
| puts | back to summary |
|---|---|
| public static void puts(Object obj)
Deprecated no longer used - uses Java's System.out Simple helper to print any objects.
| |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException Hides org. Tries to support Java unserialization of Ruby objects. This is still experimental and might not work. | |
| reifyAndAllocate | back to summary |
|---|---|
| private static IRubyObject reifyAndAllocate(Ruby runtime, RubyClass klass) Reify the class and allocate an instance.
| |
| sites | back to summary |
|---|---|
| private static JavaSites. Hides org. Doc from org. Retrieve the call sites for this class. It is expected that all Java-based core classes that do call site caching will have a similar method. | |
| specificEval | back to summary |
|---|---|
| public IRubyObject specificEval(ThreadContext context, RubyModule mod, IRubyObject[] args, Block block, EvalType evalType)
Deprecated
| |
| toRubyString | back to summary |
|---|---|
| public RubyString toRubyString(ThreadContext context) The default toString method is just a wrapper that calls the Ruby "to_s" method. This will raise if it is not actually a Ruby String.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. The default toString method is just a wrapper that calls the Ruby "to_s" method. | |
| writeObject | back to summary |
|---|---|
| private void writeObject(ObjectOutputStream out) throws IOException Hides org. Tries to support Java serialization of Ruby objects. This is still experimental and might not work. | |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Data | back to summary |
|---|---|
| public Data(Ruby runtime, RubyClass metaClass, Object data) | |
| Data | back to summary |
|---|---|
| public Data(RubyClass metaClass, Object data) | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | |
| pack-priv boolean | |
| pack-priv final ObjectOutputStream |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(String
the first input argument name, IRubyObject the second input argument value)Implements java. Performs this operation on the given arguments. |
| public void |
| count | back to summary |
|---|---|
| pack-priv int count | |
| counting | back to summary |
|---|---|
| pack-priv boolean counting | |
| out | back to summary |
|---|---|
| pack-priv final ObjectOutputStream out | |
| ObjectOutputter | back to summary |
|---|---|
| pack-priv ObjectOutputter(ObjectOutputStream out) | |
| accept | back to summary |
|---|---|
| public void accept(String name, IRubyObject value) Implements java. Doc from java. Performs this operation on the given arguments.
| |
| writeCount | back to summary |
|---|---|
| public void writeCount() | |