File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 113113 >
114114 < cfargument name = " className" hint = " The name of the class to create" type = " string" required = " Yes" >
115115 < cfscript >
116- try {
117- // do this in one line just for speed.
118- return createJavaProxy ( getURLClassLoader ().loadClass ( arguments .className ) );
116+ try {
117+ if ( server .keyExists ( " boxlang" ) ){
118+ // Boxlang's Dynamic object class handles all of our needs - we just need to retrieve the class through the module classloader
119+ return createObject ( " java" , " ortus.boxlang.runtime.interop.DynamicObject" ).init ( getURLClassLoader ().loadClass ( arguments .className ) );
120+ } else {
121+ // do this in one line just for speed.
122+ return createJavaProxy ( getURLClassLoader ().loadClass ( arguments .className ) );
123+ }
119124 } catch ( java .lang .ClassNotFoundException exc ) {
120125 throwException (
121126 " javaloader.ClassNotFoundException" ,
You can’t perform that action at this time.
0 commit comments