private MetaClass inferType(final Context context, final Object initialization) {
final Statement initStatement = GenUtil.generate(context, initialization);
final MetaClass inferredType = (initStatement != null) ? initStatement.getType() : null;
if (inferredType == null) {
throw new InvalidTypeException("No type specified and no initialization provided to infer the type.");
}
return inferredType;
}