Skip to content

Commit

Permalink
Refactor Exec Parsers - remove individual parser classes (#1396)
Browse files Browse the repository at this point in the history
* Refactor Exec Parsers - unify the code calling similar methods

This PR is to remove redundant code in many ExecParsers. We have
several ExecParsers with the same functionality in parse code.
In this PR, following changes are done:

1. If the Execs don't have expressions, then execName is assigned and
ExecInfo object is created from GenericExecParser.
2. If the Execs have expressions then reflection is used to assign the
appropriate parser to be used.
3. If there is any additional calculation in the parse function, then
only that part is overriden in the ExecParser and the rest of the
function uses the GenereicExecParser base code
4.Removed all the files which are not needed anymore

Signed-off-by: Niranjan Artal <[email protected]>

* Remove reflection instead use case classes to match and call respective Parsers

Signed-off-by: Niranjan Artal <[email protected]>

* addressed few review comments

1. default Exec name
2. added argument to GenericParser constructor

* addressed review comments

* Update tests

---------

Signed-off-by: Niranjan Artal <[email protected]>
  • Loading branch information
nartal1 authored Nov 6, 2024
1 parent 8eaeaa9 commit 019ede2
Show file tree
Hide file tree
Showing 29 changed files with 155 additions and 1,115 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 019ede2

Please sign in to comment.