|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TypeCoercer
Method Summary | |
---|---|
IRubyObject |
anyToString(IRubyObject src)
|
RubyString |
asString(IRubyObject src)
rb_obj_as_string |
IRubyObject |
checkArrayType(IRubyObject src)
|
IRubyObject |
checkStringType(IRubyObject src)
|
RubyArray |
convertToArray(IRubyObject src)
Methods which perform to_xxx if the object has such a method |
RubyFloat |
convertToFloat(IRubyObject src)
|
RubyHash |
convertToHash(IRubyObject src)
|
RubyInteger |
convertToInteger(IRubyObject src)
|
RubyInteger |
convertToInteger(IRubyObject src,
int convertMethodIndex,
java.lang.String convertMethod)
|
RubyString |
convertToString(IRubyObject src)
|
IRubyObject |
convertToType(IRubyObject src,
RubyClass targetType,
int convertMethodIndex,
java.lang.String convertMethod)
Converts this object to type 'targetType' using 'convertMethod' method and raises TypeError exception on failure (MRI: rb_convert_type). |
IRubyObject |
convertToType(IRubyObject src,
RubyClass targetType,
int convertMethodIndex,
java.lang.String convertMethod,
boolean raiseOnError)
Converts this object to type 'targetType' using 'convertMethod' method (MRI: convert_type). |
IRubyObject |
convertToTypeWithCheck(IRubyObject src,
RubyClass targetType,
int convertMethodIndex,
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). |
Method Detail |
---|
RubyArray convertToArray(IRubyObject src)
RubyHash convertToHash(IRubyObject src)
RubyFloat convertToFloat(IRubyObject src)
RubyInteger convertToInteger(IRubyObject src)
RubyInteger convertToInteger(IRubyObject src, int convertMethodIndex, java.lang.String convertMethod)
RubyString convertToString(IRubyObject src)
IRubyObject convertToType(IRubyObject src, RubyClass targetType, int convertMethodIndex, java.lang.String convertMethod, boolean raiseOnError)
targetType
- is the type we are trying to convert toconvertMethod
- is the method to be called to try and convert to targeTyperaiseOnError
- will throw an Error if conversion does not work
IRubyObject convertToType(IRubyObject src, RubyClass targetType, int convertMethodIndex, java.lang.String convertMethod)
targetType
- is the type we are trying to convert toconvertMethod
- is the method to be called to try and convert to targeType
IRubyObject convertToTypeWithCheck(IRubyObject src, RubyClass targetType, int convertMethodIndex, java.lang.String convertMethod)
targetType
- is the type we are trying to convert toconvertMethod
- is the method to be called to try and convert to targeType
IRubyObject anyToString(IRubyObject src)
RubyString asString(IRubyObject src)
IRubyObject checkStringType(IRubyObject src)
IRubyObject checkArrayType(IRubyObject src)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |