private static boolean isNamed ( String funcName , Argument [ ] args ) throws TransformerException { if ( ArrayUtil . isEmpty ( args ) ) return false ; boolean named = false ; for ( int i = 0 ; i < args . length ; i ++ ) { if ( args [ i ] instanceof NamedArgument ) named = true ; else if ( named ) throw new TransformerException ( "invalid argument for function " + funcName + ", you can not mix named and unnamed arguments" , args [ i ] . getStart ( ) ) ; } return named ; }
check if the arguments are named arguments or regular arguments throws a exception when mixed