use of com.redhat.ceylon.compiler.java.codegen.recovery.TransformationPlan in project ceylon-compiler by ceylon.
the class CeylonVisitor method visit.
public void visit(final Tree.AttributeSetterDefinition decl) {
TransformationPlan plan = gen.errors().hasDeclarationAndMarkBrokenness(decl);
if (plan instanceof Drop) {
return;
}
TransformationPlan getterPlan = gen.errors().hasDeclarationAndMarkBrokenness(getterSetterPairing.getGetter(decl));
if (getterPlan instanceof Drop) {
// because there's little chance we'll be able to generate a correct setter
return;
}
if (!acceptDeclaration(decl))
return;
int annots = gen.checkCompilerAnnotations(decl, defs);
if (Decl.withinClass(decl) && !Decl.isLocalToInitializer(decl)) {
classBuilder.attribute(gen.classGen().transform(decl, false));
} else if (Decl.withinInterface(decl)) {
classBuilder.attribute(gen.classGen().transform(decl, false));
AttributeDefinitionBuilder adb = gen.classGen().transform(decl, true);
if (decl.getDeclarationModel().isShared()) {
adb.ignoreAnnotations();
}
classBuilder.getCompanionBuilder((Interface) decl.getDeclarationModel().getContainer()).attribute(adb);
} else if (Decl.isToplevel(decl)) {
topattrBuilder.add(decl);
} else {
appendList(gen.transform(decl));
}
gen.resetCompilerAnnotations(annots);
}
Aggregations