-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathzcl_op_pretty_printer_injector.clas.abap
More file actions
35 lines (25 loc) · 1.03 KB
/
zcl_op_pretty_printer_injector.clas.abap
File metadata and controls
35 lines (25 loc) · 1.03 KB
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
35
"! need for dependency injection via lookup and unit tests
"! see openSAP course Writing Testable Code for ABAP Week_5
CLASS zcl_op_pretty_printer_injector DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
CLASS-METHODS:
inject_pretty_printer IMPORTING i_pretty_printer TYPE REF TO zif_op_value_pretty_printer,
inject_class_names IMPORTING i_class_names TYPE string_table,
inject_user_class_customizing IMPORTING i_user_class_customizing TYPE zcl_op_pretty_printer_factory=>tt_dve_cust.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_op_pretty_printer_injector IMPLEMENTATION.
METHOD inject_pretty_printer.
zcl_op_pretty_printer_factory=>pretty_printer = i_pretty_printer.
ENDMETHOD.
METHOD inject_class_names.
zcl_op_pretty_printer_factory=>class_names = i_class_names.
ENDMETHOD.
METHOD inject_user_class_customizing.
zcl_op_pretty_printer_factory=>user_class_customizing = i_user_class_customizing.
ENDMETHOD.
ENDCLASS.