Class DataStructHelper

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

public class DataStructHelper extends Object
Helper class for interacting with RPGLE Data Structures. Provides methods to get and set field values within a DataStructValue.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.smeup.rpgparser.interpreter.Type
    getType(String fieldName)
    Get the type of field of the data structure
    com.smeup.rpgparser.interpreter.Value
    getValue(String fieldName)
    Retrieves the value of a field in the data structure.
    void
    setValue(String fieldName, com.smeup.rpgparser.interpreter.Value value)
    Sets the value of a field in the data structure.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getValue

      public com.smeup.rpgparser.interpreter.Value getValue(String fieldName)
      Retrieves the value of a field in the data structure.
      Parameters:
      fieldName - the name of the field to retrieve
      Returns:
      the value of the specified field
    • setValue

      public void setValue(String fieldName, com.smeup.rpgparser.interpreter.Value value)
      Sets the value of a field in the data structure.
      Parameters:
      fieldName - the name of the field to set
      value - the value to assign to the specified field
    • getType

      public com.smeup.rpgparser.interpreter.Type getType(String fieldName)
      Get the type of field of the data structure
      Parameters:
      fieldName - The name of the field to retrieve the type of
      Returns:
      The type of the specified field