public Value evaluate( DomainEvaluator evaluator, DomainType returnType, Value sourceVal, Value argVal) throws InvalidValueException { ValueFactory valueFactory = evaluator.getValueFactory(); DomainType sourceType = sourceVal.getType(); TypeValue argTypeValue = argVal.asTypeValue(); DomainType argType = argTypeValue.getInstanceType(); return valueFactory.booleanValueOf( sourceType.isEqualTo(valueFactory.getStandardLibrary(), argType)); }
@Override public Iterable<? extends DomainInheritance> getInitialSuperInheritances() { final Iterator<? extends DomainType> iterator = domainType.getLocalSuperTypes().iterator(); return new Iterable<DomainInheritance>() { public Iterator<DomainInheritance> iterator() { return new Iterator<DomainInheritance>() { public boolean hasNext() { return iterator.hasNext(); } public DomainInheritance next() { return iterator.next().getInheritance(standardLibrary); } public void remove() { throw new UnsupportedOperationException(); } }; } }; }
public String getMetaTypeName() { return domainType.getMetaTypeName(); }
public Iterable<? extends DomainType> getLocalSuperTypes() { return domainType.getLocalSuperTypes(); }
public Iterable<? extends DomainProperty> getLocalProperties() { return domainType.getLocalProperties(); }
public Iterable<? extends DomainOperation> getLocalOperations() { return domainType.getLocalOperations(); }
public DomainReflectiveType(DomainReflectivePackage evaluationPackage, DomainType domainType) { super(domainType.getName(), evaluationPackage, computeFlags(domainType)); this.standardLibrary = evaluationPackage.getStandardLibrary(); this.domainType = domainType; }