src/Reflection.js
function() {

        // Get the "declaration" part of the method.
        var prefix = this['super']('toString').split(':')[0],
            body   = '[Function',
            args   = this.getParameters(),
            is_var = this.usesVariadicArguments();

        if (args.length > 0 && typeof (args[0]) === 'object') {
            // right now, this is spitting out every overload's signature one after another, each on a new line.
            // should probably find a better way to do this
            for (var idx = 0; idx < args.length; idx++) {
                var function_parameters_meta = args[idx];

                body += ' (';

                var first_time = true;
                for (var i = 0; i < function_parameters_meta.length; i++) {
                    if (!first_time) {
                        body += ', ';
                    }
                    first_time = false;
                    body += function_parameters_meta[i].type;
                    if (function_parameters_meta[i].name !== null) {
                        body += " " + function_parameters_meta[i].name;
                        is_var = true;
                    }
                }


                var data = this.reflector.getProto().__joii__.metadata[this.name].overloads[idx].fn.toString();
                is_var = data.match(/[\(|\.|\ ](arguments)[\)|\.|\,|\ |]/g);

                if (is_var) {
                    body += ', ...';
                }
                body += ')\n';
            }
        } else if (args.length > 0) {
            body += ' (' + args.join(', ');
            if (is_var) {
                body += ', ...';
            }
            body += ')';
        } else if (args.length === 0 && is_var) {
            body += ' (...)';
        }

        body += ']';
        return prefix + ': ' + body;
    }
function() {

        // Get the "declaration" part of the method.
        var prefix = this['super']('toString').split(':')[0],
            body   = '[Function',
            args   = this.getParameters(),
            is_var = this.usesVariadicArguments();

        if (args.length > 0 && typeof (args[0]) === 'object') {
            // right now, this is spitting out every overload's signature one after another, each on a new line.
            // should probably find a better way to do this
            for (var idx = 0; idx < args.length; idx++) {
                var function_parameters_meta = args[idx];

                body += ' (';

                var first_time = true;
                for (var i = 0; i < function_parameters_meta.length; i++) {
                    if (!first_time) {
                        body += ', ';
                    }
                    first_time = false;
                    body += function_parameters_meta[i].type;
                    if (function_parameters_meta[i].name !== null) {
                        body += " " + function_parameters_meta[i].name;
                        is_var = true;
                    }
                }


                var data = this.reflector.getProto().__joii__.metadata[this.name].overloads[idx].fn.toString();
                is_var = data.match(/[\(|\.|\ ](arguments)[\)|\.|\,|\ |]/g);

                if (is_var) {
                    body += ', ...';
                }
                body += ')\n';
            }
        } else if (args.length > 0) {
            body += ' (' + args.join(', ');
            if (is_var) {
                body += ', ...';
            }
            body += ')';
        } else if (args.length === 0 && is_var) {
            body += ' (...)';
        }

        body += ']';
        return prefix + ': ' + body;
    }
function ( ) { // Get the "declaration" part of the method. var prefix = this [ 'super' ] ( 'toString' ) . split ( ':' ) [ 0 ] , body = '[Function' , args = this . getParameters ( ) , is_var = this . usesVariadicArguments ( ) ; if ( args . length > 0 && typeof ( args [ 0 ] ) === 'object' ) { // right now, this is spitting out every overload's signature one after another, each on a new line. // should probably find a better way to do this for ( var idx = 0 ; idx < args . length ; idx ++ ) { var function_parameters_meta = args [ idx ] ; body += ' (' ; var first_time = true ; for ( var i = 0 ; i < function_parameters_meta . length ; i ++ ) { if ( ! first_time ) { body += ', ' ; } first_time = false ; body += function_parameters_meta [ i ] . type ; if ( function_parameters_meta [ i ] . name !== null ) { body += " " + function_parameters_meta [ i ] . name ; is_var = true ; } } var data = this . reflector . getProto ( ) . __joii__ . metadata [ this . name ] . overloads [ idx ] . fn . toString ( ) ; is_var = data . match ( / [\(|\.|\ ](arguments)[\)|\.|\,|\ |] / g ) ; if ( is_var ) { body += ', ...' ; } body += ')\n' ; } } else if ( args . length > 0 ) { body += ' (' + args . join ( ', ' ) ; if ( is_var ) { body += ', ...' ; } body += ')' ; } else if ( args . length === 0 && is_var ) { body += ' (...)' ; } body += ']' ; return prefix + ': ' + body ; }
Returns a string representation of the method.

@return string
Returns a string representation of the method .