Search in sources :

Example 1 with Value

use of org.whole.lang.tests.model.KindEnum.Value in project whole by wholeplatform.

the class TestsLearningInterpreterVisitor method visit.

@Override
public void visit(HasKind entity) {
    Kind kind = entity.getKind();
    if (isLearning() && EntityUtils.isResolver(kind)) {
        EntityKinds entityKind = getBindings().wGet("evaluatedSubject").wGetEntityKind();
        Value entityKindValue = KindEnum.instance.valueOf(entityKind.name());
        Kind learntKind = TestsEntityFactory.instance.createKind(entityKindValue);
        putLearntEntity(kind, learntKind);
        setResultVisitor(GenericTraversalFactory.instance.identity());
    } else
        super.visit(entity);
}
Also used : HasKind(org.whole.lang.tests.model.HasKind) Kind(org.whole.lang.tests.model.Kind) Value(org.whole.lang.tests.model.KindEnum.Value) EntityKinds(org.whole.lang.reflect.EntityKinds)

Aggregations

EntityKinds (org.whole.lang.reflect.EntityKinds)1 HasKind (org.whole.lang.tests.model.HasKind)1 Kind (org.whole.lang.tests.model.Kind)1 Value (org.whole.lang.tests.model.KindEnum.Value)1