java.lang.Object
org.checkerframework.framework.util.typeinference8.util.Resolution

public class Resolution extends Object
Resolution finds an instantiation for each variable in a given set of variables. It does this using all the bounds on a variable. Because a bound on a variable by be another unresolved variable, the order in which the variables must be computed before resolution. If the set of variables contains any captured variables, then a different resolution algorthim is used. If a set of variables does not contain a captured variable, but the resolution fails, then the resolution algorithm for captured variables is used.

Resolution is discussed in JLS Section 18.4.

Entry point is two static methods, resolveSmallestSet(Set, BoundSet) and resolve(Variable, BoundSet, Java8InferenceContext), which create Resolution objects that actually preform the resolution.

  • Method Details

    • resolve

      public static BoundSet resolve(Collection<Variable> as, BoundSet boundSet, Java8InferenceContext context)
      Instantiates a set of variables, as.
      Parameters:
      as - the set of variables to resolve
      boundSet - the bound set that includes as
      context - Java8InferenceContext
      Returns:
      bound set where as have instantiations
    • resolve

      public static BoundSet resolve(Variable a, BoundSet boundSet, Java8InferenceContext context)
      Instantiates the variable a.
      Parameters:
      a - the variable to resolve
      boundSet - the bound set that includes a
      context - Java8InferenceContext
      Returns:
      bound set where a is instantiated