Skip to content

Commit

Permalink
clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
Build Pipeline committed Sep 18, 2021
1 parent a17ee0d commit 6b6a76a
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,18 @@ public abstract class TypescriptConverterStatic {
*
*/
static BiPredicate<Class<?>,Type> typeParameterMatch = (declaringClass, type) ->
( type instanceof TypeVariable ) ?
Arrays.stream(declaringClass.getTypeParameters())
.map( (tp) -> tp.getName())
.anyMatch( name -> name.equals(((TypeVariable<?>)type).getName())) :
false
type instanceof TypeVariable && Arrays.stream(declaringClass.getTypeParameters())
.map(tp -> tp.getName())
.anyMatch(name -> name.equals(((TypeVariable<?>) type).getName()))
;

static void log( String fmt, Object ...args ) {
if( Boolean.getBoolean("debug") ) System.out.println( format( fmt, args));
if( Boolean.getBoolean("debug") ) System.out.printf( fmt, args);
}

static void debug( String fmt, Object ...args ) {
System.out.print( "DEBUG: ");
System.out.println( format( fmt, args));
System.out.printf( fmt, args );
}
/**
*
Expand Down

0 comments on commit 6b6a76a

Please sign in to comment.