|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.util.TypeConverter
public class TypeConverter
Constructor Summary | |
---|---|
TypeConverter()
|
Method Summary | |
---|---|
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 |
checkHashType(Ruby runtime,
IRubyObject obj)
|
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 |
convertToType19(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 in 1.9). |
static IRubyObject |
convertToType19(IRubyObject obj,
RubyClass target,
java.lang.String convertMethod,
boolean raise)
Converts this object to type 'targetType' using 'convertMethod' method (MRI: convert_type 1.9). |
static IRubyObject |
convertToTypeOrRaise(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(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 |
convertToTypeWithCheck19(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 |
handleUncoercibleObject(boolean raise,
IRubyObject obj,
RubyClass target)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TypeConverter()
Method Detail |
---|
@Deprecated public static final IRubyObject convertToType(IRubyObject obj, RubyClass target, int convertMethodIndex, java.lang.String convertMethod, boolean raise)
obj
- the object to converttargetType
- is the type we are trying to convert toconvertMethodIndex
- the fast index to use for calling the methodconvertMethod
- is the method to be called to try and convert to targeTyperaiseOnError
- will throw an Error if conversion does not work
public static final IRubyObject convertToType(IRubyObject obj, RubyClass target, java.lang.String convertMethod, boolean raise)
obj
- the object to converttargetType
- is the type we are trying to convert toconvertMethodIndex
- the fast index to use for calling the methodconvertMethod
- is the method to be called to try and convert to targeTyperaiseOnError
- will throw an Error if conversion does not work
public static final IRubyObject convertToType19(IRubyObject obj, RubyClass target, java.lang.String convertMethod, boolean raise)
obj
- the object to converttargetType
- is the type we are trying to convert toconvertMethodIndex
- the fast index to use for calling the methodconvertMethod
- is the method to be called to try and convert to targeTyperaiseOnError
- will throw an Error if conversion does not work
@Deprecated public static final IRubyObject convertToType(IRubyObject obj, RubyClass target, int convertMethodIndex, java.lang.String convertMethod)
obj
- the object to converttargetType
- is the type we are trying to convert toconvertMethodIndex
- the fast index to use for calling the methodconvertMethod
- is the method to be called to try and convert to targeType
public static final IRubyObject convertToType(IRubyObject obj, RubyClass target, java.lang.String convertMethod)
obj
- the object to converttargetType
- is the type we are trying to convert toconvertMethod
- is the method to be called to try and convert to targeType
public static final IRubyObject convertToType19(IRubyObject obj, RubyClass target, java.lang.String convertMethod)
obj
- the object to converttargetType
- is the type we are trying to convert toconvertMethod
- is the method to be called to try and convert to targeType
public static final IRubyObject checkData(IRubyObject obj)
obj
- the object to check
@Deprecated public static final IRubyObject convertToTypeWithCheck(IRubyObject obj, RubyClass target, int convertMethodIndex, java.lang.String convertMethod)
obj
- the object to converttargetType
- is the type we are trying to convert toconvertMethodIndex
- the fast index to use for calling the methodconvertMethod
- is the method to be called to try and convert to targeType
public static final IRubyObject convertToTypeWithCheck(IRubyObject obj, RubyClass target, java.lang.String convertMethod)
obj
- the object to converttargetType
- is the type we are trying to convert toconvertMethodIndex
- the fast index to use for calling the methodconvertMethod
- is the method to be called to try and convert to targeType
public static final IRubyObject convertToTypeWithCheck19(IRubyObject obj, RubyClass target, java.lang.String convertMethod)
obj
- the object to converttargetType
- is the type we are trying to convert toconvertMethodIndex
- the fast index to use for calling the methodconvertMethod
- is the method to be called to try and convert to targeType
public static final IRubyObject convertToTypeOrRaise(IRubyObject obj, RubyClass target, java.lang.String convertMethod)
obj
- the object to converttargetType
- is the type we are trying to convert toconvertMethod
- is the method to be called to try and convert to targeType
public static IRubyObject checkHashType(Ruby runtime, IRubyObject obj)
public static IRubyObject handleUncoercibleObject(boolean raise, IRubyObject obj, RubyClass target) throws RaiseException
RaiseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |