Search in sources :

Example 1 with TypeCompound

use of org.eclipse.ceylon.langtools.tools.javac.code.Attribute.TypeCompound in project ceylon by eclipse.

the class Gen method getAndRemoveNonFieldTAs.

private List<Attribute.TypeCompound> getAndRemoveNonFieldTAs(VarSymbol sym) {
    List<TypeCompound> tas = sym.getRawTypeAttributes();
    ListBuffer<Attribute.TypeCompound> fieldTAs = new ListBuffer<Attribute.TypeCompound>();
    ListBuffer<Attribute.TypeCompound> nonfieldTAs = new ListBuffer<Attribute.TypeCompound>();
    for (TypeCompound ta : tas) {
        if (ta.getPosition().type == TargetType.FIELD) {
            fieldTAs.add(ta);
        } else {
            if (typeAnnoAsserts) {
                Assert.error("Type annotation does not have a valid positior");
            }
            nonfieldTAs.add(ta);
        }
    }
    sym.setTypeAttributes(fieldTAs.toList());
    return nonfieldTAs.toList();
}
Also used : TypeCompound(org.eclipse.ceylon.langtools.tools.javac.code.Attribute.TypeCompound)

Aggregations

TypeCompound (org.eclipse.ceylon.langtools.tools.javac.code.Attribute.TypeCompound)1