mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-04 05:47:17 +08:00

* add global classes for objects * fix metadata * comment old code fix serializer class move missing interfaces * keep objects and bridge as local * fix syntax errors and remove SICF -> tadir dependency, instead tadir -> SICF * remove dependency TABL -> lcl_popups * fix indentation * remove old includes * fix parser errors * fix deserializing
28 lines
836 B
ABAP
28 lines
836 B
ABAP
CLASS zcl_abapgit_oo_factory DEFINITION PUBLIC.
|
|
|
|
PUBLIC SECTION.
|
|
CLASS-METHODS:
|
|
make
|
|
IMPORTING
|
|
iv_object_type TYPE tadir-object
|
|
RETURNING
|
|
VALUE(ro_object_oriented_object) TYPE REF TO zif_abapgit_oo_object_fnc.
|
|
PRIVATE SECTION.
|
|
CLASS-DATA:
|
|
go_object_oriented_object TYPE REF TO zif_abapgit_oo_object_fnc.
|
|
ENDCLASS.
|
|
|
|
CLASS zcl_abapgit_oo_factory IMPLEMENTATION.
|
|
METHOD make.
|
|
IF go_object_oriented_object IS BOUND.
|
|
ro_object_oriented_object = go_object_oriented_object.
|
|
RETURN.
|
|
ENDIF.
|
|
IF iv_object_type = 'CLAS'.
|
|
CREATE OBJECT ro_object_oriented_object TYPE zcl_abapgit_oo_class.
|
|
ELSEIF iv_object_type = 'INTF'.
|
|
CREATE OBJECT ro_object_oriented_object TYPE zcl_abapgit_oo_interface.
|
|
ENDIF.
|
|
ENDMETHOD.
|
|
ENDCLASS.
|