Search in sources :

Example 1 with DeclarationType

use of org.eclipse.ceylon.model.loader.ModelLoader.DeclarationType in project ceylon by eclipse.

the class Metamodel method findDeclarationByName.

@SuppressWarnings("hiding")
public static <DeclarationType extends ceylon.language.meta.declaration.Declaration> DeclarationType findDeclarationByName(Sequential<? extends DeclarationType> declarations, String name) {
    Iterator<? extends DeclarationType> iterator = declarations.iterator();
    Object it;
    while ((it = iterator.next()) != finished_.get_()) {
        @SuppressWarnings("unchecked") DeclarationType tp = (DeclarationType) it;
        if (tp.getName().equals(name))
            return tp;
    }
    return null;
}
Also used : DeclarationType(org.eclipse.ceylon.model.loader.ModelLoader.DeclarationType)

Aggregations

DeclarationType (org.eclipse.ceylon.model.loader.ModelLoader.DeclarationType)1