reflect.Method.getReturnCount

Returns the number of values returned by a method.

Syntax

getReturnCount()
  RETURNS INTEGER

Usage

The getReturnCount() method gives the number of return values returned by the method represented by this reflect.Method object.

The reflect.Method object used to call this method must have been created with the reflect.Type.getMethod() method, from a reflect.Type object created with a RECORD with methods, or and INTERFACE type.

Example

IMPORT reflect
TYPE Customer INTERFACE
        create(id INTEGER, name VARCHAR(30)) RETURNS SMALLINT,
        delete(id INTEGER) RETURNS SMALLINT
    END INTERFACE
FUNCTION main()
    DEFINE typ reflect.Type
    DEFINE met reflect.Method
    DEFINE cus Customer
    LET typ = reflect.Type.typeOf(cus)
    LET met = typ.getMethod(1)
    DISPLAY "return count  = ", met.getReturnCount()
END FUNCTION
Shows:
return count  =           1