Class InferenceContext

java.lang.Object
de.monticore.types3.generics.context.InferenceContext

public class InferenceContext extends Object
Context information for contextual typing, s.a. InferenceContext4Ast.
  • Field Details

  • Constructor Details

    • InferenceContext

      public InferenceContext()
  • Method Details

    • getVisitorMode

      public InferenceVisitorMode getVisitorMode()
    • setVisitorMode

      public void setVisitorMode(InferenceVisitorMode mode)
    • hasTargetType

      public boolean hasTargetType()
    • getTargetType

      public SymTypeExpression getTargetType()
      type for expression compatibility constraint, s. Java spec 20 18.2.1
    • setTargetType

      public void setTargetType(SymTypeExpression targetType)
    • getPartialFunctionInfo

      public PartialFunctionInfo getPartialFunctionInfo()
      Returns the target type information if the target type is a function type and not all information about the function is available. However, if a target function type is available, its information is returned instead.
    • getInferenceResults

      public List<InferenceResult> getInferenceResults()
    • setInferredTypes

      public void setInferredTypes(List<InferenceResult> inferredTypes)
    • deepClone

      public InferenceContext deepClone()
      Warn: inferred types are cloned rather shallow, as cloning them tends to not be required.