Class ReturnTypeInferer

java.lang.Object
nz.org.riskscape.defaults.classifier.ReturnTypeInferer

public class ReturnTypeInferer extends Object

Wraps a RealizedTreeFilter so that the optimal getResultType() can be produced from the many RealizedTreeExpressions that could be called upon when evaluate(java.lang.Object) is called.

If we actually cared about classifier functions, we could drop this class and just use typeSet.computeAncestors

  • Constructor Details

  • Method Details

    • build

      public static nz.org.riskscape.problem.ResultOrProblems<ReturnTypeInferer> build(RealizedTreeFilter filter, nz.org.riskscape.engine.typeset.TypeSet typeSet)
    • evaluate

      public Object evaluate(Object input)
    • getWrapped

      public RealizedTreeFilter getWrapped()
    • getResultType

      public nz.org.riskscape.engine.types.Type getResultType()