public void engage(CodeGenConfiguration configuration) {
//test the databinding type. If not just fall through
if (testFallThrough(configuration.getDatabindingType())) {
return;
}
try {
//invoke the adb codegen by reflection
Class adbGeneratorClass = Class.
forName(ADB_INVOKE_CLASS_NAME);
Method invokeMethod = adbGeneratorClass.getMethod(
INVOKE_METHOD_NAME,
new Class[] { CodeGenConfiguration.class });
invokeMethod.invoke(null, new Object[] { configuration });
} catch (Exception e) {
throw new RuntimeException(e);
}
}
|