use of org.eclipse.ceylon.compiler.java.codegen.recovery.ThrowerMethod in project ceylon by eclipse.
the class ClassTransformer method transform.
public List<MethodDefinitionBuilder> transform(Tree.AnyMethod def, TransformationPlan plan, ClassDefinitionBuilder classBuilder) {
Function model = def.getDeclarationModel();
if (model.isParameter()) {
return List.nil();
}
if (plan instanceof ThrowerMethod) {
addRefinedThrowerMethod(classBuilder, plan.getErrorMessage().getMessage(), (Class) model.getContainer(), (Function) model.getRefinedDeclaration());
return List.<MethodDefinitionBuilder>nil();
}
// Transform the method body of the 'inner-most method'
boolean prevSyntheticClassBody = expressionGen().withinSyntheticClassBody(Decl.isMpl(model) || ModelUtil.isLocalNotInitializer(model) || expressionGen().isWithinSyntheticClassBody());
List<JCStatement> body = transformMethodBody(def);
expressionGen().withinSyntheticClassBody(prevSyntheticClassBody);
return transform(def, classBuilder, body);
}
Aggregations