Package com.odiago.flumebase.lang

Examples of com.odiago.flumebase.lang.UniversalConstraintExtractor


    // actual constraints on each of these.
    Map<UniversalType, List<Type>> unifications = new HashMap<UniversalType, List<Type>>();
    for (int i = 0; i < abstractArgTypes.size(); i++) {
      Type abstractType = abstractArgTypes.get(i);
      Type actualType = mExprTypes.get(i);
      UniversalConstraintExtractor constraintExtractor = new UniversalConstraintExtractor();
      if (constraintExtractor.extractConstraint(abstractType, actualType)) {
        // Found a UniversalType. Make sure it's mapped to a list of actual constraints.
        UniversalType univType = constraintExtractor.getUniversalType();
        List<Type> actualConstraints = unifications.get(univType);
        if (null == actualConstraints) {
          actualConstraints = new ArrayList<Type>();
          unifications.put(univType, actualConstraints);
        }

        // Add the actual constraint of the expression being applied as this argument.
        actualConstraints.add(constraintExtractor.getConstraintType());
      }
    }

    // Perform unifications on all the UniversalType expressions.
    Map<Type, Type> unificationOut = new HashMap<Type, Type>();
View Full Code Here

TOP

Related Classes of com.odiago.flumebase.lang.UniversalConstraintExtractor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.