In my practice once a marker interface was really very helpful. When I have a project with many independents modules and one core module and need to execute some operations with some of modules in core module. For required classes I implement this marker interface and then in core module only write a check a class
instanceof
interface if yes than execute actions.