Top Description Fields Constructors Methods
org.jruby.runtime

public Class ArgumentDescriptor

extends Object
Class Inheritance
Imports
org.jruby.Ruby, .RubyArray, .RubyEncoding, .RubyString, .RubySymbol, org.jruby.api.Convert, java.util.Arrays

A description of a single argument in a Ruby argument list. Primarily used in Method.to_proc.

Field Summary

Modifier and TypeField and Description
public static final ArgumentDescriptor[]
pack-priv static final byte[]
public static final ArgumentDescriptor[]
pack-priv static final String
public final RubySymbol
name

The name of the argument

public static final ArgumentDescriptor[]
public final ArgumentType
type

The type of the argument

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public RubyString
public static ArgumentDescriptor[]

Returns:

an array of descriptors
decode
(Ruby
to reify ids back into symbols
runtime
,
String
the encoded String
encodedDescriptors
)

Translate encoded String of argument descriptors back into an ArgumentDescriptor list

public static String

Returns:

the encoded descriptors
encode
(ArgumentDescriptor[]
the list to convert into a string
descriptors
)

Allow JIT/AOT to store argument descriptors as a single String constant.

public final RubyArray<T extends IRubyObject>
toArrayForm(Ruby runtime, boolean isLambda)
Deprecated since 10.0.

public final RubyArray<T extends IRubyObject>
toArrayForm(ThreadContext context, boolean isLambda)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ANON_RESTback to summary
public static final ArgumentDescriptor[] ANON_REST
ANONYMOUS_ENCODEDback to summary
pack-priv static final byte[] ANONYMOUS_ENCODED
EMPTY_ARRAYback to summary
public static final ArgumentDescriptor[] EMPTY_ARRAY
ENCODING_DELIMETERback to summary
pack-priv static final String ENCODING_DELIMETER
nameback to summary
public final RubySymbol name

The name of the argument

SYMBOL_PROCback to summary
public static final ArgumentDescriptor[] SYMBOL_PROC
typeback to summary
public final ArgumentType type

The type of the argument

Constructor Detail

ArgumentDescriptorback to summary
public ArgumentDescriptor(ArgumentType type, RubySymbol name)
ArgumentDescriptorback to summary
public ArgumentDescriptor(ArgumentType type)

Method Detail

asParameterNameback to summary
public RubyString asParameterName(ThreadContext context)
decodeback to summary
public static ArgumentDescriptor[] decode(Ruby runtime, String encodedDescriptors)

Translate encoded String of argument descriptors back into an ArgumentDescriptor list

Parameters
runtime:Ruby

to reify ids back into symbols

encodedDescriptors:String

the encoded String

Returns:ArgumentDescriptor[]

an array of descriptors

encodeback to summary
public static String encode(ArgumentDescriptor[] descriptors)

Allow JIT/AOT to store argument descriptors as a single String constant.

Parameters
descriptors:ArgumentDescriptor[]

the list to convert into a string

Returns:String

the encoded descriptors

toArrayFormback to summary
public final RubyArray<T extends IRubyObject> toArrayForm(Ruby runtime, boolean isLambda)

Deprecated

since 10.0.

Annotations
@Deprecated
since:10.0
toArrayFormback to summary
public final RubyArray<T extends IRubyObject> toArrayForm(ThreadContext context, boolean isLambda)