//Remove these annotations from the list
anns = new ArrayList<Annotation>(d.getAnnotations().size());
anns.addAll(d.getAnnotations());
for (Iterator<Annotation> iter = anns.iterator(); iter.hasNext();) {
final Annotation a = iter.next();
final Declaration ad = d.getUnit().getPackage().getMemberOrParameter(d.getUnit(), a.getName(), null, false);
final String qn = ad.getQualifiedNameString();
if (qn.startsWith("ceylon.language::") && MetamodelGenerator.annotationBits.contains(qn.substring(17))) {
iter.remove();
}
}
if (anns.isEmpty()) {
return;
}
}
gen.out(",", MetamodelGenerator.KEY_ANNOTATIONS, ":function(){return[");
boolean first = true;
for (Annotation a : anns) {
Declaration ad = d.getUnit().getPackage().getMemberOrParameter(d.getUnit(), a.getName(), null, false);
if (ad instanceof Method) {
if (first) first=false; else gen.out(",");
final boolean isDoc = "ceylon.language::doc".equals(ad.getQualifiedNameString());
if (!isDoc) {
gen.qualify(node, ad);
gen.out(gen.getNames().name(ad), "(");
}
if (a.getPositionalArguments() == null) {