public static ClassLoader classLoader ( final ClassLoader parent , File projectDir ) throws IOException { requireNonNull ( parent , "ClassLoader required." ) ; File publicDir = new File ( projectDir , "public" ) ; if ( publicDir . exists ( ) ) { return new URLClassLoader ( new URL [ ] { publicDir . toURI ( ) . toURL ( ) } , parent ) ; } return parent ; }
Constructs a new AssetClassLoader that includes the public dir if present in the provided working dir