Class DefaultExpressionRealizer

java.lang.Object
nz.org.riskscape.engine.rl.DefaultExpressionRealizer
All Implemented Interfaces:
nz.org.riskscape.engine.rl.ExpressionRealizer

public class DefaultExpressionRealizer extends Object implements nz.org.riskscape.engine.rl.ExpressionRealizer

Realizes riskscape language expressions in to reified/realized objects that can be evaluated.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface nz.org.riskscape.engine.rl.ExpressionRealizer

    nz.org.riskscape.engine.rl.ExpressionRealizer.ProblemCodes
  • Field Summary

    Fields inherited from interface nz.org.riskscape.engine.rl.ExpressionRealizer

    NO_SUCH_MEMBER
  • Constructor Summary

    Constructors
    Constructor
    Description
    DefaultExpressionRealizer(@NonNull nz.org.riskscape.engine.rl.RealizationContext context)
     
    DefaultExpressionRealizer(nz.org.riskscape.rl.ExpressionParser parser, nz.org.riskscape.engine.rl.RealizationContext realizationContext)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    nz.org.riskscape.engine.rl.RealizedExpression
    asStruct(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.engine.rl.RealizedExpression expression)
     
    nz.org.riskscape.rl.ast.Expression
    parse(String source)
     
    nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.rl.RealizedExpression>
    realize(nz.org.riskscape.engine.types.Type inputType, String source)
     
    nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.rl.RealizedExpression>
    realize(nz.org.riskscape.engine.types.Type inputType, nz.org.riskscape.rl.ast.Expression expression)
     
    nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.rl.agg.RealizedAggregateExpression>
    realizeAggregate(nz.org.riskscape.engine.types.Type inputType, nz.org.riskscape.rl.ast.Expression expression)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface nz.org.riskscape.engine.rl.ExpressionRealizer

    realizeConstant
  • Constructor Details

    • DefaultExpressionRealizer

      public DefaultExpressionRealizer(@NonNull @NonNull nz.org.riskscape.engine.rl.RealizationContext context)
    • DefaultExpressionRealizer

      public DefaultExpressionRealizer(nz.org.riskscape.rl.ExpressionParser parser, nz.org.riskscape.engine.rl.RealizationContext realizationContext)
  • Method Details

    • asStruct

      public nz.org.riskscape.engine.rl.RealizedExpression asStruct(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.engine.rl.RealizedExpression expression)
      Specified by:
      asStruct in interface nz.org.riskscape.engine.rl.ExpressionRealizer
    • realize

      public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.rl.RealizedExpression> realize(nz.org.riskscape.engine.types.Type inputType, String source)
      Specified by:
      realize in interface nz.org.riskscape.engine.rl.ExpressionRealizer
    • realize

      public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.rl.RealizedExpression> realize(nz.org.riskscape.engine.types.Type inputType, nz.org.riskscape.rl.ast.Expression expression)
      Specified by:
      realize in interface nz.org.riskscape.engine.rl.ExpressionRealizer
    • parse

      public nz.org.riskscape.rl.ast.Expression parse(String source)
      Specified by:
      parse in interface nz.org.riskscape.engine.rl.ExpressionRealizer
    • realizeAggregate

      public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.rl.agg.RealizedAggregateExpression> realizeAggregate(nz.org.riskscape.engine.types.Type inputType, nz.org.riskscape.rl.ast.Expression expression)
      Specified by:
      realizeAggregate in interface nz.org.riskscape.engine.rl.ExpressionRealizer