Package com.smeup.kokos.sdk.rpgle.util
Class RpgProgramHelper
java.lang.Object
com.smeup.kokos.sdk.rpgle.util.RpgProgramHelper
This class contains a set of helper methods useful to implement doped
programs
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassThis class wraps the program entry state -
Constructor Summary
ConstructorsConstructorDescriptionRpgProgramHelper(com.smeup.rpgparser.interpreter.SystemInterface systemInterface, String pgmName) Create an instance of RpgProgramHelper. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbuildFunInputFromEntry(LinkedHashMap<String, com.smeup.rpgparser.interpreter.Value> programParams) com.smeup.rpgparser.parsing.ast.CompilationUnitcom.smeup.rpgparser.interpreter.DataDefinitiongetDataDefinition(String field) List<com.smeup.rpgparser.interpreter.ProgramParam> Returns the program entry signature.com.smeup.rpgparser.interpreter.TypeGet the type of field.newDataStructHelper(com.smeup.rpgparser.interpreter.DataStructValue dataStructValue) Creates a new instance of DataStructHelper.Creates a new program entrynewProgramEntryByParams(LinkedHashMap<String, com.smeup.rpgparser.interpreter.Value> params) Creates an instance of ProgramEntry.
-
Constructor Details
-
RpgProgramHelper
public RpgProgramHelper(com.smeup.rpgparser.interpreter.SystemInterface systemInterface, String pgmName) Create an instance of RpgProgramHelper.- Parameters:
systemInterface- The SystemInterfacepgmName- 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
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
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
-
getType
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)
-