Top Description Fields Constructors Methods
org.jruby.java.proxies

public Class ArrayJavaProxyCreator

extends RubyObject
Class Inheritance
Imports
org.jruby.Ruby, .RubyClass, .RubyObject, org.jruby.anno.JRubyMethod, org.jruby.runtime.Arity, .ThreadContext, org.jruby.runtime.builtin.IRubyObject

A shim class created when constructing primitive arrays from proxied Java classes. In the following code: Java::byte[50].new The [50] call produces an instance of ArrayJavaProxyCreator. The [] method can be called with any number of integer arguments to create a multi-dimensional array creator, or calls to [] can be chained for the same effect. The eventual call to new is against the ArrayJavaProxyCreator instance, and the result is a wrapped Java array of the specified dimensions and element type of the original receiver (the byte class, above).

Field Summary

Modifier and TypeField and Description
pack-priv int[]
pack-priv final Class<?>
private static final int[]
Inherited from org.jruby.RubyObject:
IVAR_INSPECTING_OBJECT_ALLOCATOROBJECT_ALLOCATORREIFYING_OBJECT_ALLOCATOR

Constructor Summary

AccessConstructor and Description
pack-priv
ArrayJavaProxyCreator(final ThreadContext context, Class<?> elementType, final IRubyObject[] sizes)

private
ArrayJavaProxyCreator(final Ruby runtime, Class<?> elementType)

Method Summary

Modifier and TypeMethod and Description
private void
public static RubyClass
public final ArrayJavaProxy
public final IRubyObject
op_aref(ThreadContext context, IRubyObject[] sizes)

Inherited from org.jruby.RubyObject:
attachToObjectSpacecallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitconvertToTypedigdig1dig2eqlInternalequalInternalequalsfinishObjectClassgetNativeClassIndexhashCodeinspectop_eqqputsspecificEvaltoRubyStringtoString

Field Detail

dimensionsback to summary
pack-priv int[] dimensions
elementTypeback to summary
pack-priv final Class<?> elementType
EMPTYback to summary
private static final int[] EMPTY

Constructor Detail

ArrayJavaProxyCreatorback to summary
pack-priv ArrayJavaProxyCreator(final ThreadContext context, Class<?> elementType, final IRubyObject[] sizes)
ArrayJavaProxyCreatorback to summary
private ArrayJavaProxyCreator(final Ruby runtime, Class<?> elementType)

Method Detail

aggregateDimensionsback to summary
private void aggregateDimensions(ThreadContext context, final IRubyObject[] sizes)
createArrayJavaProxyCreatorback to summary
public static RubyClass createArrayJavaProxyCreator(ThreadContext context, RubyClass Object)
new_instanceback to summary
public final ArrayJavaProxy new_instance(ThreadContext context)
Annotations
@JRubyMethod
name:new, new_instance
op_arefback to summary
public final IRubyObject op_aref(ThreadContext context, IRubyObject[] sizes)
Annotations
@JRubyMethod
name:[]
required:1
rest:true
checkArity:false