* dynamically loading code.
* @return A new MethodFactory.
*/
public static MethodFactory createFactory(ClassLoader classLoader) {
// if reflection is forced or we've determined that we can't load bytecode, use reflection
if (reflection || !CAN_LOAD_BYTECODE) return new ReflectionMethodFactory();
// if we're dumping invokers to disk, use dumping
if (dumping) return new DumpingInvocationMethodFactory(dumpingPath, classLoader);
// otherwise, generate invokers at runtime