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