Package org.jruby.java.proxies
Class ArrayJavaProxy
java.lang.Object
org.jruby.RubyBasicObject
org.jruby.RubyObject
org.jruby.java.proxies.JavaProxy
org.jruby.java.proxies.ArrayJavaProxy
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<IRubyObject>,InstanceVariables,InternalVariables,IRubyObject,CoreObjectType
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jruby.java.proxies.JavaProxy
JavaProxy.ClassMethodsNested classes/interfaces inherited from class org.jruby.RubyObject
RubyObject.DataNested classes/interfaces inherited from class org.jruby.RubyBasicObject
RubyBasicObject.Finalizer -
Field Summary
Fields inherited from class org.jruby.RubyObject
IVAR_INSPECTING_OBJECT_ALLOCATOR, OBJECT_ALLOCATOR, REIFYING_OBJECT_ALLOCATORFields 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, IS_OVERLAID_F, metaClass, NEVER, NIL_F, REFINED_MODULE_F, STAMP_OFFSET, TAINTED_F, UNDEF, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F, USER8_F, USER9_F, USERA_F, VAR_TABLE_OFFSET, varTable, varTableStampFields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionArrayJavaProxy(Ruby runtime, RubyClass klazz, Object array) ArrayJavaProxy(Ruby runtime, RubyClass klazz, Object array, JavaUtil.JavaConverter converter) -
Method Summary
Modifier and TypeMethodDescriptionprotected JavaArrayasJavaObject(Object array) Deprecated.at(ThreadContext context, IRubyObject index) protected Objectcomponent_type(ThreadContext context) count(ThreadContext context, Block block) count(ThreadContext context, IRubyObject obj, Block unused) static RubyClasscreateArrayJavaProxy(ThreadContext context, RubyClass JavaProxy, RubyModule Enumerable) final IRubyObjectdig(ThreadContext context, IRubyObject[] args) dup()RubyMethod dup.each(ThreadContext context, Block block) each_with_index(ThreadContext context, Block block) empty_p(ThreadContext context) eql_p(ThreadContext context, IRubyObject obj) booleanThis override does not do a "checked" dispatch.first(ThreadContext context) first(ThreadContext context, IRubyObject count) get(int index) Class<?> final JavaArrayDeprecated.getRange(ThreadContext context, IRubyObject arg0) getRange(ThreadContext context, IRubyObject[] args) getRange(ThreadContext context, IRubyObject first, IRubyObject length) hash(ThreadContext context) Will return the hash code of this object.inthashCode()This override does not do "checked" dispatch since Object usually has #hash defined.include_p(ThreadContext context, IRubyObject obj) inspect(ThreadContext context) Returns a string containing a human-readable representation of obj.last(ThreadContext context) last(ThreadContext context, IRubyObject count) final intlength()length(ThreadContext context) static ArrayJavaProxyDeprecated.static ArrayJavaProxynewArray(ThreadContext context, Class<?> elementType, int... dimensions) final IRubyObjectop_aref(ThreadContext context, IRubyObject arg) final IRubyObjectop_aref(ThreadContext context, IRubyObject[] args) final IRubyObjectop_aset(ThreadContext context, IRubyObject index, IRubyObject value) op_equal(ThreadContext context, IRubyObject other) rb_obj_equal Will by default use identity equality to compare objects.op_plus(ThreadContext context, IRubyObject other) rbClone()RubyMethod clone.voidsetValue(Ruby runtime, int index, IRubyObject value) protected static IRubyObjectsize(ThreadContext context, ArrayJavaProxy self, IRubyObject[] args) A size method suitable for lambda method reference implementation ofRubyEnumerator.SizeFn.size(ThreadContext, IRubyObject, IRubyObject[])to_a(ThreadContext context) toString()The default toString method is just a wrapper that calls the Ruby "to_s" method.Methods inherited from class org.jruby.java.proxies.JavaProxy
checkVariablesOnProxy, createJavaProxy, dataGetStruct, dataWrapStruct, equal_p, field_accessor, field_reader, field_writer, getJavaClass, getJavaClass, getObject, getVariable, inherited, initialize_copy, inspectHashCode, installField, java_class, java_method, java_method, java_send, java_send, java_send, java_send, marshal_dump, marshal_dump, marshal_load, new_array, op_aref, persistent, persistent, setJavaClass, setJavaClass, setJavaClass, setObject, setVariable, singleton_class, singleton_class, singletonClass, toJava, unwrap, wrapMethods inherited from class org.jruby.RubyObject
attachToObjectSpace, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, convertToType, dig, dig1, dig2, eqlInternal, equalInternal, finishObjectClass, getNativeClassIndex, inspect, op_eqq, puts, specificEval, toRubyStringMethods inherited from class org.jruby.RubyBasicObject
addFinalizer, addFinalizer, anyToString, asJavaString, asString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, checkCallMethod, checkCallMethod, checkFrozen, checkStringType, cloneSetup, compareTo, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToInteger, convertToInteger, convertToString, copyInstanceVariablesInto, copySpecialInstanceVariables, dataGetStructChecked, decode, display, dupFinalizer, dupSetup, ensureInstanceVariablesSettable, eql, eql_p, evalUnder, extend, fastGetInstanceVariable, fastGetInternalVariable, fastHasInstanceVariable, fastHasInternalVariable, fastSetInstanceVariable, fastSetInternalVariable, finishBasicObjectClass, forEachInstanceVariable, forEachInstanceVariableName, freeze, frozen_p, getCurrentContext, getFFIHandle, getFlag, getInstanceEvalClass, getInstanceEvalClass, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariables, getMarshalVariableList, getMetaClass, getMetaClass, getNativeHandle, getNativeTypeIndex, getObjectId, getRuntime, getSingletonClass, getSingletonClassClone, getSingletonClassCloneAndAttach, getSingletonClassCloneAndAttach, getType, getVariableCount, getVariableList, getVariableNameList, hash, hashyInspect, hasInstanceVariable, hasInstanceVariables, hasInternalVariable, hasVariables, id, infectBy, initialize, initialize_copy, inspect, instance_eval, instance_eval, instance_eval, instance_eval, instance_eval, instance_exec, instance_of_p, instance_variable_defined_p, instance_variable_get, instance_variable_set, instance_variables, isBuiltin, isClass, isFalse, isFrozen, isImmediate, isModule, isNil, isSpecialConst, isSpecialObject, isTaint, isTrue, isUntrusted, kind_of_p, makeMetaClass, makeMetaClass, makeMetaClassBootstrap, method, method, method, method_missing, methods, methods, nil_p, nonFixnumHashCode, nonFixnumHashCode, OBJ_INIT_COPY, objInitCopy, op_cmp, op_match, op_not, op_not_equal, op_not_match, private_methods, protected_methods, public_methods, rbClone, rbInspect, remove_instance_variable, removeFinalizers, removeInstanceVariable, removeInternalVariable, respond_to_p, respond_to_p, respondsTo, respondsToMissing, respondsToMissing, send, send, send, send, send, setFFIHandle, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setNativeHandle, setTaint, setUntrusted, singleton_method, singleton_method, singleton_method_added, singleton_method_removed, singleton_method_undefined, singleton_methods, specificEval, specificEval, specificEval, specificEval, syncVariables, syncVariables, taint, taint, tainted_p, testFrozen, testFrozen, to_a, to_s, to_s, trust, type, untaint, untrust, untrusted_p, validateInstanceVariable, validateInstanceVariable, validateInstanceVariable, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableRemove, variableTableStore, variableTableSync, yieldUnder, yieldUnderMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jruby.runtime.builtin.IRubyObject
checkStringType19, dup, marshalLiveVariables
-
Constructor Details
-
ArrayJavaProxy
-
ArrayJavaProxy
public ArrayJavaProxy(Ruby runtime, RubyClass klazz, Object array, JavaUtil.JavaConverter converter)
-
-
Method Details
-
createArrayJavaProxy
public static RubyClass createArrayJavaProxy(ThreadContext context, RubyClass JavaProxy, RubyModule Enumerable) -
newArray
@Deprecated(since="10.0") public static ArrayJavaProxy newArray(Ruby runtime, Class<?> elementType, int... dimensions) Deprecated. -
newArray
public static ArrayJavaProxy newArray(ThreadContext context, Class<?> elementType, int... dimensions) -
asJavaObject
Deprecated.- Overrides:
asJavaObjectin classJavaProxy
-
getJavaArray
Deprecated. -
get
-
set
-
setValue
-
length
public final int length() -
length
-
empty_p
-
op_aref
-
op_aref
-
op_aset
-
include_p
-
first
-
first
-
last
-
last
-
count
-
count
-
dig
-
at
-
op_plus
-
each
-
each_with_index
-
to_a
- Overrides:
to_ain classRubyBasicObject
-
getComponentType
-
component_type
-
inspect
Description copied from class:RubyBasicObjectReturns a string containing a human-readable representation of obj. If not overridden, uses theto_smethod to generate the string. [ 1, 2, 3..4, 'five' ].inspect #=> "[1, 2, 3..4, \"five\"]" Time.new.inspect #=> "Wed Apr 09 08:54:39 CDT 2003"- Specified by:
inspectin interfaceIRubyObject- Overrides:
inspectin classRubyBasicObject
-
toString
Description copied from class:RubyObjectThe default toString method is just a wrapper that calls the Ruby "to_s" method.- Overrides:
toStringin classRubyObject- Returns:
- string representation
-
op_equal
Description copied from class:RubyBasicObjectrb_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- Specified by:
op_equalin interfaceIRubyObject- Overrides:
op_equalin classRubyBasicObject
-
eql_p
- Overrides:
eql_pin classRubyBasicObject
-
equals
Description copied from class:RubyObjectThis override does not do a "checked" dispatch.- Overrides:
equalsin classRubyObject- Parameters:
obj- object to compare- Returns:
- true if equals
- See Also:
-
hash
Description copied from class:RubyBasicObjectWill 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.- Overrides:
hashin classRubyBasicObject- Parameters:
context- the current thread context- Returns:
- the hash value
-
hashCode
public int hashCode()Description copied from class:RubyObjectThis override does not do "checked" dispatch since Object usually has #hash defined.- Overrides:
hashCodein classRubyObject- Returns:
- the hash code
- See Also:
-
dup
Description copied from interface:IRubyObjectRubyMethod dup.- Specified by:
dupin interfaceIRubyObject- Overrides:
dupin classRubyBasicObject- Returns:
- a dup-ed object
-
rbClone
Description copied from interface:IRubyObjectRubyMethod clone.- Specified by:
rbClonein interfaceIRubyObject- Overrides:
rbClonein classRubyBasicObject- Returns:
- a cloned object
-
cloneObject
- Overrides:
cloneObjectin classJavaProxy
-
getRange
-
getRange
-
getRange
-
size
A size method suitable for lambda method reference implementation ofRubyEnumerator.SizeFn.size(ThreadContext, IRubyObject, IRubyObject[])- See Also:
-