Search in sources :

Example 1 with Value

use of org.whole.lang.queries.model.KindTestEnum.Value in project whole by wholeplatform.

the class QueriesDynamicCompilerVisitor method visit.

@Override
public void visit(KindTest entity) {
    Value kind = entity.getValue();
    switch(kind.getOrdinal()) {
        case KindTestEnum.IMPL_ord:
            setResultIterator(IteratorFactory.isImplIterator().withSourceEntity(entity));
            break;
        case KindTestEnum.FRAGMENT_ord:
            setResultIterator(IteratorFactory.isFragmentIterator().withSourceEntity(entity));
            break;
        case KindTestEnum.VARIABLE_ord:
            setResultIterator(IteratorFactory.isVariableIterator().withSourceEntity(entity));
            break;
        case KindTestEnum.RESOLVER_ord:
            setResultIterator(IteratorFactory.isResolverIterator().withSourceEntity(entity));
            break;
        default:
            EntityKinds ekind = EntityKinds.valueOf(kind.getName());
            setResultIterator(IteratorFactory.hasKindIterator(ekind).withSourceEntity(entity));
    }
}
Also used : Value(org.whole.lang.queries.model.KindTestEnum.Value) EntityKinds(org.whole.lang.reflect.EntityKinds)

Aggregations

Value (org.whole.lang.queries.model.KindTestEnum.Value)1 EntityKinds (org.whole.lang.reflect.EntityKinds)1