public final int getMinArity ( ) { // NOTE(nicksantos): There are some native functions that have optional // parameters before required parameters. This algorithm finds the position // of the last required parameter. int i = 0 ; int min = 0 ; for ( Node n : getParameters ( ) ) { i ++ ; if ( ! n . isOptionalArg ( ) && ! n . isVarArgs ( ) ) { min = i ; } } return min ; }
Gets the minimum number of arguments that this function requires .