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));
 }
Example #2
0
  @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();
          }
        };
      }
    };
  }
Example #3
0
 public String getMetaTypeName() {
   return domainType.getMetaTypeName();
 }
Example #4
0
 public Iterable<? extends DomainType> getLocalSuperTypes() {
   return domainType.getLocalSuperTypes();
 }
Example #5
0
 public Iterable<? extends DomainProperty> getLocalProperties() {
   return domainType.getLocalProperties();
 }
Example #6
0
 public Iterable<? extends DomainOperation> getLocalOperations() {
   return domainType.getLocalOperations();
 }
Example #7
0
 public DomainReflectiveType(DomainReflectivePackage evaluationPackage, DomainType domainType) {
   super(domainType.getName(), evaluationPackage, computeFlags(domainType));
   this.standardLibrary = evaluationPackage.getStandardLibrary();
   this.domainType = domainType;
 }