}
// used by compiler
public static CallbackFactory createFactory(Ruby runtime, Class type, ClassLoader classLoader) {
if (reflection) {
return new ReflectionCallbackFactory(type);
} else if (dumping) {
return new DumpingInvocationCallbackFactory(runtime, type, classLoader);
} else {
// FIXME: No, I don't like it.
return new InvocationCallbackFactory(runtime, type, classLoader);