// For some reason, the method type could not be retrieved,
// use the default java.lang.String type
}
} else {
// Must be a TransformerBasedFieldTransformation
TransformerBasedFieldTransformation classTransformation = (TransformerBasedFieldTransformation) transformation;
String methodName = "buildFieldValue";
Class[] params = new Class[] {Object.class, String.class, Session.class};
try {
Class returnType = Helper.getDeclaredMethod(classTransformation.getTransformerClass(), methodName, params).getReturnType();
if (returnType.equals(Object.class)) {
// User needs to be more specific with their class
// transformer return type if they are using DDL. Throw
// an exception.
throw ValidationException.missingFieldTypeForDDLGenerationOfClassTransformation(mapping.getDescriptor(), mapping.getAttributeName(), methodName);
}
getFieldDefFromDBField(classTransformation.getField(), false).setType(returnType);
} catch (NoSuchMethodException ex) {
// For some reason, the method type could not be retrieved.
// Did the interface method change? Throw an exception.
throw ValidationException.missingTransformerMethodForDDLGenerationOfClassTransformation(mapping.getDescriptor(), mapping.getAttributeName(), methodName);
}