Class PartialFunctionInfo

java.lang.Object
de.monticore.types3.generics.util.PartialFunctionInfo

public class PartialFunctionInfo extends Object
describes partial SymTypeOfFunction information, used during selection of generic overloaded functions
  • Constructor Details

    • PartialFunctionInfo

      public PartialFunctionInfo()
    • PartialFunctionInfo

      public PartialFunctionInfo(SymTypeOfFunction targetType)
  • Method Details

    • setReturnTargetType

      public void setReturnTargetType(SymTypeExpression returnTargetType)
    • hasReturnTargetType

      public boolean hasReturnTargetType()
    • getReturnTargetType

      public SymTypeExpression getReturnTargetType()
    • setParameterCount

      public void setParameterCount(int parameterCount)
    • hasParameterCount

      public boolean hasParameterCount()
    • getParameterCount

      public int getParameterCount()
    • setArgumentType

      public void setArgumentType(int idx, SymTypeExpression argumentType)
      Parameters:
      argumentType - if null removes entry
    • hasArgumentType

      public boolean hasArgumentType(int idx)
    • getArgumentType

      public SymTypeExpression getArgumentType(int idx)
    • hasAllArgumentTypes

      public boolean hasAllArgumentTypes()
    • setArgumentExpr

      public void setArgumentExpr(int idx, ASTExpression argumentExpr)
      Parameters:
      argumentExpr - if null removes entry
    • setArgumentExprs

      public void setArgumentExprs(List<? extends ASTExpression> argumentExprs)
      QOL: sets all argument expressions + number of arguments at once
    • hasArgumentExpr

      public boolean hasArgumentExpr(int idx)
    • getArgumentExpr

      public ASTExpression getArgumentExpr(int idx)
    • getAsFunctionIfComplete

      public Optional<SymTypeOfFunction> getAsFunctionIfComplete()
      Returns:
      the collected information as a function, iff complete. WARNING: the returned functions return type is a return target(!) type, NOT the actual expected return type!
    • deepClone

      public PartialFunctionInfo deepClone()