@@ -19,10 +19,11 @@ object Toolbox {
1919 /** Create a new instance of the toolbox.
2020 *
2121 * This instance of the toolbox tries to recover the classloader of the application based on
22- * the classloader of the class that call make. This may not always be the correct classloader.
22+ * the classloader of the class that call make. This may not always be the correct classloader,
23+ * in which case the classloader must be passed explicitly.
2324 *
2425 * @param settings TODO
25- * @return
26+ * @return A new instance of the toolbox
2627 */
2728 @ forceInline def make (implicit settings : Settings ): Toolbox = {
2829 // Get the name of the class at call site
@@ -33,17 +34,17 @@ object Toolbox {
3334 make(cl)
3435 }
3536
36- /** Create a new instance of the toolbox
37+ /** Create a new instance of the toolbox using the the classloader of the application.
3738 *
38- * @param cl TODO
39- * @param settings TODO
39+ * @param appClassloader classloader of the application that generated the quotes
40+ * @param settings toolbox settings
4041 * @return A new instance of the toolbox
4142 */
42- def make (cl : ClassLoader )(implicit settings : Settings ): Toolbox = {
43+ def make (appClassloader : ClassLoader )(implicit settings : Settings ): Toolbox = {
4344 try {
44- val toolboxImplCls = cl .loadClass(" dotty.tools.dotc.quoted.ToolboxImpl" )
45- val makeMeth = toolboxImplCls.getMethod(" make2 " , classOf [Settings ], classOf [ClassLoader ])
46- makeMeth.invoke(null , settings, cl ).asInstanceOf [Toolbox ]
45+ val toolboxImplCls = appClassloader .loadClass(" dotty.tools.dotc.quoted.ToolboxImpl" )
46+ val makeMeth = toolboxImplCls.getMethod(" make " , classOf [Settings ], classOf [ClassLoader ])
47+ makeMeth.invoke(null , settings, appClassloader ).asInstanceOf [Toolbox ]
4748 }
4849 catch {
4950 case ex : ClassNotFoundException =>
0 commit comments