dimanche 23 octobre 2022

Dynamically get top level package in source root

I world like to get a root package where inner package branching starts.

For example: src/main/java/com/my/pack/example

and inside there is a fist occurance of multiple packages: inner1 and inner2

Given this structure I want to get com.my.pack.example

I know I can iterate over packages starting from some class deep inside and do some filtering. but is there any easier way or existing util?





Aucun commentaire:

Enregistrer un commentaire