@@ -39,12 +39,12 @@ public abstract class TypescriptConverterStatic {
3939 static final String ENDL = ";\n " ;
4040
4141 public static final List <TSType > PREDEFINED_TYPES = Arrays .asList (
42- TSType .from (Class .class ),
43- TSType .from (Serializable .class ),
44- TSType .from (Closeable .class ),
45- TSType .from (AutoCloseable .class ),
46- TSType .from (Cloneable .class ),
47- TSType .from (RandomAccess .class )
42+ TSType .of (Class .class ),
43+ TSType .of (Serializable .class ),
44+ TSType .of (Closeable .class ),
45+ TSType .of (AutoCloseable .class ),
46+ TSType .of (Cloneable .class ),
47+ TSType .of (RandomAccess .class )
4848 );
4949
5050
@@ -58,20 +58,18 @@ public abstract class TypescriptConverterStatic {
5858 *
5959 */
6060 static BiPredicate <Class <?>,Type > typeParameterMatch = (declaringClass , type ) ->
61- ( type instanceof TypeVariable ) ?
62- Arrays .stream (declaringClass .getTypeParameters ())
63- .map ( (tp ) -> tp .getName ())
64- .anyMatch ( name -> name .equals (((TypeVariable <?>)type ).getName ())) :
65- false
61+ type instanceof TypeVariable && Arrays .stream (declaringClass .getTypeParameters ())
62+ .map (tp -> tp .getName ())
63+ .anyMatch (name -> name .equals (((TypeVariable <?>) type ).getName ()))
6664 ;
6765
6866 static void log ( String fmt , Object ...args ) {
69- if ( Boolean .getBoolean ("debug" ) ) System .out .println ( format ( fmt , args ) );
67+ if ( Boolean .getBoolean ("debug" ) ) System .out .printf ( fmt , args );
7068 }
7169
7270 static void debug ( String fmt , Object ...args ) {
7371 System .out .print ( "DEBUG: " );
74- System .out .println ( format ( fmt , args ) );
72+ System .out .printf ( fmt , args );
7573 }
7674 /**
7775 *
@@ -265,18 +263,19 @@ static String convertJavaToTS( Class<?> type,
265263 return format ("any /*%s*/" ,type .getName ());
266264
267265 }
268-
269- /**
270- *
271- * @param type
272- * @param declaringMember
273- * @param declaredTypeMap
274- * @param packageResolution
275- * @param typeMatch
276- * @param onTypeMismatch
277- * @return
278- */
279- public static <M extends Member > String convertJavaToTS (
266+
267+ /**
268+ *
269+ * @param type
270+ * @param declaringMember
271+ * @param declaringType
272+ * @param declaredTypeMap
273+ * @param packageResolution
274+ * @param onTypeMismatch
275+ * @param <M>
276+ * @return
277+ */
278+ public static <M extends Member > String convertJavaToTS (
280279 Type type ,
281280 M declaringMember ,
282281 TSType declaringType ,
@@ -290,6 +289,7 @@ public static <M extends Member> String convertJavaToTS(
290289 Objects .requireNonNull (declaredTypeMap , "declaredTypeMap argument is null!" );
291290
292291 log ( "PROCESSING MEMEBER: [%s]" , declaringMember .getName ());
292+
293293 /**
294294 *
295295 */
0 commit comments