public class TypeConverter
extends java.lang.Object
| Constructor and Description |
|---|
TypeConverter() |
| Modifier and Type | Method and Description |
|---|---|
static IRubyObject |
checkArrayType(IRubyObject obj)
Deprecated.
|
static IRubyObject |
checkArrayType(Ruby runtime,
IRubyObject obj) |
static IRubyObject |
checkArrayType(ThreadContext context,
IRubyObject obj) |
static IRubyObject |
checkArrayType(ThreadContext context,
JavaSites.CheckedSites sites,
IRubyObject obj) |
static IRubyObject |
checkData(IRubyObject obj)
Checks that this object is of type DATA and then returns it, otherwise raises failure (MRI: Check_Type(obj, T_DATA))
|
static IRubyObject |
checkFloatType(Ruby runtime,
IRubyObject obj) |
static IRubyObject |
checkHashType(Ruby runtime,
IRubyObject obj) |
static IRubyObject |
checkHashType(ThreadContext context,
JavaSites.CheckedSites sites,
IRubyObject obj) |
static RubySymbol |
checkID(IRubyObject obj)
Convert the supplied object into an internal identifier String.
|
static RubySymbol |
checkID(Ruby runtime,
java.lang.String name)
Convert the supplied object into an internal identifier String.
|
static IRubyObject |
checkIntegerType(Ruby runtime,
IRubyObject obj,
java.lang.String method) |
static IRubyObject |
checkIntegerType(ThreadContext context,
IRubyObject obj) |
static IRubyObject |
checkStringType(Ruby runtime,
IRubyObject obj) |
static IRubyObject |
checkStringType(ThreadContext context,
JavaSites.CheckedSites sites,
IRubyObject obj) |
static IRubyObject |
checkStringType(ThreadContext context,
JavaSites.CheckedSites sites,
IRubyObject obj,
RubyClass target) |
static void |
checkType(ThreadContext context,
IRubyObject x,
RubyModule type) |
static java.lang.String |
convertToIdentifier(IRubyObject obj)
Deprecated.
|
static IRubyObject |
convertToInteger(ThreadContext context,
IRubyObject val,
int base) |
static IRubyObject |
convertToType(IRubyObject obj,
RubyClass target,
int convertMethodIndex,
java.lang.String convertMethod)
Deprecated.
|
static IRubyObject |
convertToType(IRubyObject obj,
RubyClass target,
int convertMethodIndex,
java.lang.String convertMethod,
boolean raise)
Deprecated.
|
static IRubyObject |
convertToType(IRubyObject obj,
RubyClass target,
java.lang.String convertMethod)
Converts this object to type 'targetType' using 'convertMethod' method and raises TypeError exception on failure (MRI: rb_convert_type).
|
static IRubyObject |
convertToType(IRubyObject obj,
RubyClass target,
java.lang.String convertMethod,
boolean raise)
Converts this object to type 'targetType' using 'convertMethod' method (MRI: convert_type).
|
static IRubyObject |
convertToType(ThreadContext context,
IRubyObject obj,
RubyClass target,
JavaSites.CheckedSites sites)
Converts this object to type 'targetType' using 'convertMethod' method and raises TypeError exception on failure (MRI: rb_convert_type).
|
static IRubyObject |
convertToType(ThreadContext context,
IRubyObject obj,
RubyClass target,
JavaSites.CheckedSites sites,
boolean raise)
Converts this object to type 'targetType' using 'convertMethod' method (MRI: convert_type 1.9).
|
static IRubyObject |
convertToType(ThreadContext context,
IRubyObject obj,
RubyClass target,
java.lang.String convertMethod,
boolean raise) |
static IRubyObject |
convertToType19(IRubyObject obj,
RubyClass target,
java.lang.String convertMethod)
Deprecated.
|
static IRubyObject |
convertToType19(IRubyObject obj,
RubyClass target,
java.lang.String convertMethod,
boolean raise)
Deprecated.
|
static IRubyObject |
convertToType19(ThreadContext context,
IRubyObject obj,
RubyClass target,
JavaSites.CheckedSites sites)
Deprecated.
|
static IRubyObject |
convertToType19(ThreadContext context,
IRubyObject obj,
RubyClass target,
JavaSites.CheckedSites sites,
boolean raise)
Deprecated.
|
static IRubyObject |
convertToTypeOrRaise(IRubyObject obj,
RubyClass target,
java.lang.String convertMethod)
Deprecated.
|
static IRubyObject |
convertToTypeWithCheck(IRubyObject obj,
RubyClass target,
int convertMethodIndex,
java.lang.String convertMethod)
Deprecated.
|
static IRubyObject |
convertToTypeWithCheck(IRubyObject obj,
RubyClass target,
java.lang.String convertMethod)
Higher level conversion utility similar to convertToType but it can throw an
additional TypeError during conversion (MRI: rb_check_convert_type).
|
static IRubyObject |
convertToTypeWithCheck(ThreadContext context,
IRubyObject obj,
RubyClass target,
JavaSites.CheckedSites sites)
Higher level conversion utility similar to convertToType but it can throw an
additional TypeError during conversion (MRI: rb_check_convert_type).
|
static IRubyObject |
convertToTypeWithCheck19(IRubyObject obj,
RubyClass target,
java.lang.String convertMethod)
Deprecated.
|
static IRubyObject |
convertToTypeWithCheck19(ThreadContext context,
IRubyObject obj,
RubyClass target,
JavaSites.CheckedSites sites)
Deprecated.
|
static IRubyObject |
handleImplicitlyUncoercibleObject(boolean raise,
IRubyObject obj,
RubyClass target)
Deprecated.
|
static IRubyObject |
handleUncoercibleObject(boolean raise,
IRubyObject obj,
RubyClass target) |
static IRubyObject |
handleUncoercibleObject(Ruby runtime,
IRubyObject obj,
RubyClass target,
boolean raise) |
static IRubyObject |
ioCheckIO(Ruby runtime,
IRubyObject obj) |
static RubyIO |
ioGetIO(Ruby runtime,
IRubyObject obj) |
static RaiseException |
newTypeError(IRubyObject obj,
RubyClass target,
java.lang.String convertMethod,
IRubyObject val) |
static RaiseException |
newTypeError(Ruby runtime,
IRubyObject obj,
RubyClass target,
java.lang.String methodName,
IRubyObject val) |
static RubyArray |
rb_Array(ThreadContext context,
IRubyObject val) |
static RubyArray |
to_ary(ThreadContext context,
IRubyObject ary) |
static RubyFloat |
toFloat(Ruby runtime,
IRubyObject obj) |
static RubyString |
typeAsString(IRubyObject obj) |
public static IRubyObject convertToType(IRubyObject obj, RubyClass target, java.lang.String convertMethod, boolean raise)
obj - the object to converttarget - is the type we are trying to convert toconvertMethod - is the method to be called to try and convert to target typeraise - will throw an Error if conversion does not workpublic static IRubyObject convertToType(ThreadContext context, IRubyObject obj, RubyClass target, java.lang.String convertMethod, boolean raise)
public static IRubyObject convertToType(ThreadContext context, IRubyObject obj, RubyClass target, JavaSites.CheckedSites sites, boolean raise)
obj - the object to converttarget - is the type we are trying to convert tosites - is the CheckedSites call sites to be called to try and convert to targetTyperaise - will throw an Error if conversion does not workpublic static IRubyObject convertToType(IRubyObject obj, RubyClass target, java.lang.String convertMethod)
obj - the object to converttarget - is the type we are trying to convert toconvertMethod - is the method to be called to try and convert to targeTypepublic static IRubyObject convertToType(ThreadContext context, IRubyObject obj, RubyClass target, JavaSites.CheckedSites sites)
obj - the object to converttarget - is the type we are trying to convert tosites - is the CheckedSites call sites to use to dispatch the convert method@Deprecated public static IRubyObject convertToType19(IRubyObject obj, RubyClass target, java.lang.String convertMethod, boolean raise)
@Deprecated public static IRubyObject convertToType19(ThreadContext context, IRubyObject obj, RubyClass target, JavaSites.CheckedSites sites, boolean raise)
@Deprecated public static IRubyObject convertToType19(IRubyObject obj, RubyClass target, java.lang.String convertMethod)
@Deprecated public static IRubyObject convertToType19(ThreadContext context, IRubyObject obj, RubyClass target, JavaSites.CheckedSites sites)
public static RubyFloat toFloat(Ruby runtime, IRubyObject obj)
public static IRubyObject checkData(IRubyObject obj)
obj - the object to checkpublic static RubyString typeAsString(IRubyObject obj)
public static RubySymbol checkID(IRubyObject obj)
public static RubySymbol checkID(Ruby runtime, java.lang.String name)
public static IRubyObject convertToTypeWithCheck(IRubyObject obj, RubyClass target, java.lang.String convertMethod)
obj - the object to converttarget - is the type we are trying to convert toconvertMethod - is the method to be called to try and convert to targeTypepublic static IRubyObject convertToTypeWithCheck(ThreadContext context, IRubyObject obj, RubyClass target, JavaSites.CheckedSites sites)
obj - the object to converttarget - is the type we are trying to convert tosites - the CheckedSites call sites to use for coersion@Deprecated public static IRubyObject convertToTypeWithCheck19(IRubyObject obj, RubyClass target, java.lang.String convertMethod)
@Deprecated public static IRubyObject convertToTypeWithCheck19(ThreadContext context, IRubyObject obj, RubyClass target, JavaSites.CheckedSites sites)
public static RaiseException newTypeError(IRubyObject obj, RubyClass target, java.lang.String convertMethod, IRubyObject val)
public static RaiseException newTypeError(Ruby runtime, IRubyObject obj, RubyClass target, java.lang.String methodName, IRubyObject val)
public static IRubyObject checkIntegerType(ThreadContext context, IRubyObject obj)
public static IRubyObject checkIntegerType(Ruby runtime, IRubyObject obj, java.lang.String method)
public static IRubyObject checkFloatType(Ruby runtime, IRubyObject obj)
public static IRubyObject checkHashType(Ruby runtime, IRubyObject obj)
public static IRubyObject checkHashType(ThreadContext context, JavaSites.CheckedSites sites, IRubyObject obj)
public static IRubyObject checkStringType(Ruby runtime, IRubyObject obj)
public static IRubyObject checkStringType(ThreadContext context, JavaSites.CheckedSites sites, IRubyObject obj)
public static IRubyObject checkStringType(ThreadContext context, JavaSites.CheckedSites sites, IRubyObject obj, RubyClass target)
public static IRubyObject checkArrayType(Ruby runtime, IRubyObject obj)
public static IRubyObject checkArrayType(ThreadContext context, JavaSites.CheckedSites sites, IRubyObject obj)
public static IRubyObject ioCheckIO(Ruby runtime, IRubyObject obj)
public static RubyIO ioGetIO(Ruby runtime, IRubyObject obj)
public static IRubyObject checkArrayType(ThreadContext context, IRubyObject obj)
@Deprecated public static IRubyObject checkArrayType(IRubyObject obj)
public static IRubyObject handleUncoercibleObject(boolean raise, IRubyObject obj, RubyClass target)
public static IRubyObject handleUncoercibleObject(Ruby runtime, IRubyObject obj, RubyClass target, boolean raise)
@Deprecated public static IRubyObject handleImplicitlyUncoercibleObject(boolean raise, IRubyObject obj, RubyClass target)
public static void checkType(ThreadContext context, IRubyObject x, RubyModule type)
public static IRubyObject convertToInteger(ThreadContext context, IRubyObject val, int base)
public static RubyArray rb_Array(ThreadContext context, IRubyObject val)
public static RubyArray to_ary(ThreadContext context, IRubyObject ary)
@Deprecated public static IRubyObject convertToType(IRubyObject obj, RubyClass target, int convertMethodIndex, java.lang.String convertMethod, boolean raise)
@Deprecated public static IRubyObject convertToType(IRubyObject obj, RubyClass target, int convertMethodIndex, java.lang.String convertMethod)
@Deprecated public static IRubyObject convertToTypeWithCheck(IRubyObject obj, RubyClass target, int convertMethodIndex, java.lang.String convertMethod)
@Deprecated public static java.lang.String convertToIdentifier(IRubyObject obj)
@Deprecated public static IRubyObject convertToTypeOrRaise(IRubyObject obj, RubyClass target, java.lang.String convertMethod)
obj - the object to converttarget - is the type we are trying to convert toconvertMethod - is the method to be called to try and convert to targeTypeCopyright © 2001-2020 JRuby. All Rights Reserved.