protected Mapping getMapping(Class clazz) throws SpeedoException {
return getMapping(clazz, scp);
}
public static Mapping getMapping(Class clazz, SpeedoCompilerParameter scp) throws SpeedoException {
ClassProject cp = clazz.getClassProject(scp.projectName);
if (cp == null) {
throw new SpeedoException("No classproject found for the class "
+ clazz.getFQName() + " and the project " + scp.projectName);
}
int idx = scp.mapperName.indexOf('.');
Mapping m = cp.getMapping(idx == -1
? scp.mapperName
: scp.mapperName.substring(0, idx));
if (m == null) {
throw new SpeedoException("No mapping found for the class "
+ clazz.getFQName() + ", the project " + scp.projectName