public static < T > Class < T > compile ( ClassLoader cl , String name , String code ) { Tuple2 < ClassLoader , String > cacheKey = Tuple2 . of ( cl , name ) ; Class < ? > clazz = COMPILED_CACHE . getIfPresent ( cacheKey ) ; if ( clazz == null ) { clazz = doCompile ( cl , name , code ) ; COMPILED_CACHE . put ( cacheKey , clazz ) ; } //noinspection unchecked return ( Class < T > ) clazz ; }
Compiles a generated code to a Class .