.arg(lit(primitive.argumentErrorMessage()))
.arg(e.invoke("getMessage")));
}
private GenericDispatchStrategy genericDispatchStrategy(PrimitiveModel primitive) {
JvmMethod overload = primitive.getOverloads().get(0);
if (overload.isGroupGeneric()) {
if (overload.getGenericGroup().equals("Ops")) {
return new OpsGroupGenericDispatchStrategy(codeModel, primitive.getName());
} else if (overload.getGenericGroup().equals("Summary")) {
return new SummaryGroupGenericStrategy(codeModel, primitive.getName());
} else {
throw new GeneratorDefinitionException(
"Group generic dispatch for group '" + overload.getGenericName()
+ "' is not implemented");
}
} else if (overload.isGeneric()) {
return new SimpleDispatchStrategy(codeModel, primitive.getName());
} else {
return new GenericDispatchStrategy(codeModel);
}
}