Class RpgProgramHelper

java.lang.Object
com.smeup.kokos.sdk.rpgle.util.RpgProgramHelper

public class RpgProgramHelper extends Object
This class contains a set of helper methods useful to implement doped programs
  • Constructor Details

    • RpgProgramHelper

      public RpgProgramHelper(com.smeup.rpgparser.interpreter.SystemInterface systemInterface, String pgmName)
      Create an instance of RpgProgramHelper.
      Parameters:
      systemInterface - The SystemInterface
      pgmName - Rpg program name, program rpg must be present because RpgProgramHelper will be used its ast to provide a simple facade interface to the CompilationUnit
      See Also:
  • Method Details

    • newProgramEntryByParams

      public RpgProgramHelper.ProgramEntry newProgramEntryByParams(LinkedHashMap<String,com.smeup.rpgparser.interpreter.Value> params)
      Creates an instance of ProgramEntry.
      Parameters:
      params - Params used to create the program entry
      Returns:
      An instance of ProgramEntry
    • newProgramEntry

      public RpgProgramHelper.ProgramEntry newProgramEntry()
      Creates a new program entry
      Returns:
      An instance of ProgramEntry
    • newDataStructHelper

      public DataStructHelper newDataStructHelper(com.smeup.rpgparser.interpreter.DataStructValue dataStructValue)
      Creates a new instance of DataStructHelper.
      Parameters:
      dataStructValue - The DataStructValue to be wrapped by the helper.
      Returns:
      A new instance of DataStructHelper.
    • getParams

      public List<com.smeup.rpgparser.interpreter.ProgramParam> getParams()
      Returns the program entry signature. You should use this method as the return value in the context of: Program.params() implementation
      Returns:
      The entry
    • getDataDefinition

      public com.smeup.rpgparser.interpreter.DataDefinition getDataDefinition(String field)
    • getType

      public com.smeup.rpgparser.interpreter.Type getType(String name)
      Get the type of field.
      Parameters:
      name - The field name.
      Returns:
      The type of the specified field.
    • getCompilationUnit

      public com.smeup.rpgparser.parsing.ast.CompilationUnit getCompilationUnit()
    • buildFunInputFromEntry

      public static String buildFunInputFromEntry(LinkedHashMap<String,com.smeup.rpgparser.interpreter.Value> programParams)