Please understand this report:
START-OF-SELECTION.
  DATA(o_class_name) = |ZBC_UML_SCANNER|.

  DATA(o_class_desc) = CAST cl_abap_classdescr( cl_abap_typedescr=>describe_by_name( o_class_name ) ).
  cl_demo_output=>write_data( o_class_desc->kind ).


  LOOP AT o_class_desc->methods ASSIGNING FIELD-SYMBOL(<m>).

    cl_demo_output=>write( <m>-name ).

    LOOP AT <m>-parameters ASSIGNING FIELD-SYMBOL(<p>).
      cl_demo_output=>write( <p>-name ).
    ENDLOOP.

  ENDLOOP.

  cl_demo_output=>display( ).

Append it by the functionality to read the source code and add comments to attributes, params, classes and methods by scrapping the source code.
Also append the comments within in a method to a method.

How to get the source code:
    TRY.
* Objektname: Klasse oder Interface
        DATA(lv_obj_name) = |ZBC_UML_CLASS|.

        DATA(o_source) = cl_oo_factory=>create_instance( ).

        DATA(o_source2) = o_source->create_clif_source( clif_name = lv_obj_name version   = if_oo_clif_source=>co_version_active ).

* Typ ausgeben
        WRITE: / COND string( WHEN o_source2->get_type( ) = 0 THEN 'Class' ELSE 'Interface' ).

        ULINE.

* Code zum Objekt holen
        lt_source = VALUE rswsourcet( ).
        o_source2->get_source( IMPORTING source = lt_source ).

      CATCH cx_root INTO DATA(e_txt).
        WRITE: / e_txt->get_text( ).
    ENDTRY.

Example Sourcecode to understand the pattern:

CLASS zbc_uml_scanner DEFINITION
  PUBLIC
  FINAL
  CREATE PUBLIC .

  PUBLIC SECTION.

    "! Scan the specified object and return the diagram data
    "! @parameter iv_obj_name | Object name
    "! @parameter iv_devclass | Development class
    "! @parameter rv_data | Diagram data
    CLASS-METHODS scan
      IMPORTING
                iv_obj_name    TYPE sobj_name
                iv_devclass    TYPE devclass
      RETURNING VALUE(rv_data) TYPE cl_uml_class_scanner=>uml_tab.

  PROTECTED SECTION.
  PRIVATE SECTION.
ENDCLASS.



CLASS zbc_uml_scanner IMPLEMENTATION.

  METHOD scan.

    " Define which types to scan
    DATA: lt_scan_types TYPE cl_uml_class_scanner=>uml_range_types.

*    APPEND iv_obj_name TO lt_scan_types.

    APPEND VALUE #( sign = 'I' option = 'EQ' low = iv_obj_name ) TO lt_scan_types.

    " Define which packages to scan
    DATA: lt_scan_packages TYPE cl_uml_class_scanner=>uml_range_packages.

    APPEND VALUE #( sign = 'I' option = 'EQ' low = iv_devclass ) TO lt_scan_packages.

    cl_uml_cache=>get_singleton( )->clear_type_cache( ).

    " Execute the scanner
    TRY.
        DATA(lo_uml_scanner) = NEW cl_uml_class_scanner( ).
        lo_uml_scanner->execute(
          EXPORTING
            scan_packages = lt_scan_packages
            scan_types    = lt_scan_types
        ).
      CATCH cx_root INTO DATA(lx_root).
        RAISE EXCEPTION lx_root.
    ENDTRY.

    lo_uml_scanner->set_scanner_configuration(
      EXPORTING
        scan_local_types       = abap_true
        add_structures         = abap_true
        scan_used_types        = abap_true
        scan_function_groups   = abap_true
        scan_programs          = abap_true
        scan_deep              = abap_true
        scan_business_objects  = abap_false
        max_scan_depth         = 10
    ).

    " Get the diagram data
    DATA: lv_kind TYPE c,
          lr_data TYPE REF TO data.

    lo_uml_scanner->get_diagram(
      IMPORTING
        e_kind = lv_kind
      CHANGING
        c_data = lr_data
    ).

    IF lv_kind <> lo_uml_scanner->c_kind_uml_tab.
      MESSAGE 'Unexpected diagram kind' TYPE 'E'.
      RETURN.
    ENDIF.

    " Assign the diagram data to internal table
    FIELD-SYMBOLS: <lt_uml_tab> TYPE cl_uml_class_scanner=>uml_tab.
    ASSIGN lr_data->* TO <lt_uml_tab>.
    IF sy-subrc <> 0 OR <lt_uml_tab> IS INITIAL.
      MESSAGE 'Failed to retrieve diagram data' TYPE 'E'.
      RETURN.
    ENDIF.

    rv_data = <lt_uml_tab>.

  ENDMETHOD.

ENDCLASS.