Commit d4f44cd1 authored by Lionel Seinturier's avatar Lionel Seinturier
Browse files

Refactoring: use named helper classes that refer to the type for which the...

Refactoring: use named helper classes that refer to the type for which the methods are defined, instead of the general SpoonHelper class.
parent 134252e1
......@@ -43,7 +43,7 @@ import org.objectweb.fractal.juliac.opt.ultramerge.IllegalComponentCodeException
import org.objectweb.fractal.juliac.opt.ultramerge.UMClass;
import org.objectweb.fractal.juliac.opt.ultramerge.UMField;
import org.objectweb.fractal.juliac.opt.ultramerge.UMMethod;
import org.objectweb.fractal.juliac.spoon.SpoonHelper;
import org.objectweb.fractal.juliac.spoon.helper.CtNamedElementHelper;
import org.objectweb.fractal.juliac.ucf.UnifiedClass;
import org.ow2.frascati.tinfi.TinfiRuntimeException;
......@@ -93,7 +93,7 @@ public class SCAUltraMerge extends AbstractUltraMerge {
// Defensive programming. Shouldn't occur.
final String msg =
"Unexpected case. No reference name for field: "+
SpoonHelper.toEclipseClickableString(ctfield);
CtNamedElementHelper.toEclipseClickableString(ctfield);
throw new TinfiRuntimeException(msg);
}
......@@ -211,7 +211,7 @@ public class SCAUltraMerge extends AbstractUltraMerge {
fieldType.getActualTypeArguments();
if( genericTypes==null || genericTypes.size()!=1 ) {
final String msg =
SpoonHelper.toEclipseClickableString(ctfield)+
CtNamedElementHelper.toEclipseClickableString(ctfield)+
" expected to be of type List<K>";
throw new JuliacRuntimeException(msg);
}
......@@ -310,7 +310,7 @@ public class SCAUltraMerge extends AbstractUltraMerge {
final String msg =
"Illegal name ("+methName+
") for @Reference annotated setter method: "+
SpoonHelper.toEclipseClickableString(ctmethod);
CtNamedElementHelper.toEclipseClickableString(ctmethod);
throw new IllegalComponentCodeException(msg);
}
refName = methName.substring(3,4).toLowerCase();
......@@ -334,7 +334,7 @@ public class SCAUltraMerge extends AbstractUltraMerge {
final String msg =
"Setter method body does not contain one and only one "+
"statement: "+
SpoonHelper.toEclipseClickableString(ctmethod);
CtNamedElementHelper.toEclipseClickableString(ctmethod);
throw new IllegalComponentCodeException(msg);
}
CtStatement stat = stats.get(0);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment