All files / src/json zcl_abapgit_ajson_ref_init_lib.clas.locals_imp.abap

100% Statements 34/34
100% Branches 3/3
100% Functions 2/2
100% Lines 34/34

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 351x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 3x 3x 1x 1x 1x  
**********************************************************************
*  INITIALIZE REFS BY PATH
**********************************************************************
 
CLASS lcl_path_refs_init DEFINITION.
  PUBLIC SECTION.
    INTERFACES zif_abapgit_ajson_ref_init.
 
    METHODS constructor
      IMPORTING
        !it_data_refs TYPE zif_abapgit_ajson_ref_init~tty_data_refs.
 
  PRIVATE SECTION.
    DATA mt_data_refs TYPE zif_abapgit_ajson_ref_init~tty_data_refs.
ENDCLASS.
 
CLASS lcl_path_refs_init IMPLEMENTATION.
 
  METHOD constructor.
    mt_data_refs = it_data_refs.
  ENDMETHOD.
 
  METHOD zif_abapgit_ajson_ref_init~get_data_ref.
 
    FIELD-SYMBOLS <data_ref> LIKE LINE OF mt_data_refs.
 
    READ TABLE mt_data_refs ASSIGNING <data_ref>
      WITH KEY by_path COMPONENTS path = is_node-path name = is_node-name.
    IF sy-subrc = 0.
      ro_ref = <data_ref>-dref.
    ENDIF.
 
  ENDMETHOD.
ENDCLASS.