import debug from 'debug' ; const log = debug ( 'j2t:core:paramEnhance' ) ; export function argumentMap ( ) { let _arguments = Array . from ( arguments ) ; return _arguments . map ( ( argumentItem ) => argumentItem . __fields2java ? paramEnhance ( argumentItem . __fields2java ( ) ) : argumentItem ) ; } function paramEnhance ( javaParams ) { if ( javaParams instanceof Array ) { for ( let i = 0 , ilen = javaParams . length ; i < ilen ; i ++ ) { let itemParam = javaParams [ i ] ; minusRedundancy ( itemParam ) ; } } else { minusRedundancy ( javaParams ) ; } return javaParams ; } function minusRedundancy ( itemParam ) { if ( ! itemParam ) { return ; } for ( var _key in itemParam . $ ) { if ( itemParam . $ [ _key ] === null || itemParam . $ [ _key ] === undefined ) { delete itemParam . $ [ _key ] ; log ( '删除 key %s from %j ' , itemParam , _key ) ; } } } export type JavaString = Object ; export type JavaBoolean = Object ; export type Javaboolean = Object ; export type JavaInteger = Object ; export type Javaint = Object ; export type JavaShort = Object ; export type Javashort = Object ; export type Javabyte = Object ; export type JavaByte = Object ; export type JavaLong = Object ; export type Javalong = Object ; export type Javadouble = Object ; export type JavaDouble = Object ; export type Javafloat = Object ; export type JavaFloat = Object ; export type Javachar = Object ; export type Javachars = Object ; export type JavaList = Object ; export type JavaSet = Object ; export type JavaHashMap = Object ; export type JavaMap = Object ;