Skip to content

Bring CallFinder from Logging#6

Merged
alexander-yevsyukov merged 23 commits intomasterfrom
caller-finder
May 6, 2024
Merged

Bring CallFinder from Logging#6
alexander-yevsyukov merged 23 commits intomasterfrom
caller-finder

Conversation

@alexander-yevsyukov
Copy link
Contributor

@alexander-yevsyukov alexander-yevsyukov commented May 6, 2024

This PR brings the class CallerFinder from Logging framework (nee io.spine.logging.flogger.util.CallerFinder) to become the part of reflect library.

The reason for starting this transition is that we have already the second occasion for the feature of knowing a class calling another class. More specifically, the need for such an ability was discovered when developing PipelineSetup utility in ProtoData. We need to know the class which creates an instance of PipelineSetup so that we can use the ClassLoader of the class for loading its resources from within PipelineSetup instance.

Apart from brining CallerFinder and related classes and tests, the associated code in Java was converted to Kotlin.

Also the following refactorings were made:

  • CallerFinder.getStackForCallerOf() was renamed to stackForCallerOf().
  • StackGetter.getStackForCaller() was renamed to stackForCaller().

Future actions

  • The Logging library need to be migrated to the code introduced by this PR.

@alexander-yevsyukov alexander-yevsyukov self-assigned this May 6, 2024
@alexander-yevsyukov alexander-yevsyukov marked this pull request as ready for review May 6, 2024 11:10
@alexander-yevsyukov alexander-yevsyukov requested a review from armiol May 6, 2024 12:13
@alexander-yevsyukov alexander-yevsyukov added this pull request to the merge queue May 6, 2024
Merged via the queue into master with commit 254fe02 May 6, 2024
@alexander-yevsyukov alexander-yevsyukov deleted the caller-finder branch May 6, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants