private List < Object > buildMetadataArgs ( String line , String paramName , String [ ] defaultValues ) { final List < Object > list = new ArrayList <> ( ) ; final String [ ] [ ] ret = sqlLine . splitCompound ( line ) ; String [ ] compound ; if ( ret == null || ret . length != 2 ) { if ( defaultValues [ defaultValues . length - 1 ] == null ) { throw new IllegalArgumentException ( sqlLine . loc ( "arg-usage" , ret == null || ret . length == 0 ? "" : ret [ 0 ] [ 0 ] , paramName ) ) ; } compound = new String [ 0 ] ; } else { compound = ret [ 1 ] ; } if ( compound . length <= defaultValues . length ) { list . addAll ( Arrays . asList ( defaultValues ) . subList ( 0 , defaultValues . length - compound . length ) ) ; list . addAll ( Arrays . asList ( compound ) ) ; } else { list . addAll ( Arrays . asList ( compound ) . subList ( 0 , defaultValues . length ) ) ; } return list ; }
Constructs a list of string parameters for a metadata call .