Allow Traits visitors to schedule after visitors
What problem are you trying to solve?
Traits are great to simplify development, but can not be used when changes to imports are needed, as the required hooks to register a doAfterVisitor are not exposed.
Describe the solution you'd like
Allow traits to call doAfterVisit, or similar, to register imports to be added/removed for wider applicability.
Have you considered any alternatives or workarounds?
Use the Traits visitor only within another visitor, but this is awkward and might even be more confusing.
Additional context
As seen on the AssertEqualsToAssertThat example, where the imports make it impossible to switch to a Trait.
I also remember stumbling over this limitation when I implemented the ShortenFullyQualifiedTypeReferences utility, which I wanted to be part of JavaTemplate.
This issue is stale because it has not had any activity for 60 days. Remove question label or comment or this will be closed in two weeks. Issues may be reopened when there is renewed interest.