Skip to content

Generate visitor for subtypes with a discriminator#66

Merged
sschnabe merged 2 commits intokokuwaio:mainfrom
auke-:visitor-for-subtypes
Apr 13, 2021
Merged

Generate visitor for subtypes with a discriminator#66
sschnabe merged 2 commits intokokuwaio:mainfrom
auke-:visitor-for-subtypes

Conversation

@auke-
Copy link
Copy Markdown
Contributor

@auke- auke- commented Apr 9, 2021

When types which extend a common type and are distinguished based on a
discriminator are consumed they are often cast to their specific Java
type which results in error prone boilerplate code.

By generating a visitor for those kind of types the various subtypes can
be consumed in a type safe manner.

auke- added 2 commits April 9, 2021 16:46
When types which extend a common type and are distinguished based on a
discriminator are consumed they are often cast to their specific Java
type which results in error prone boilerplate code.

By generating a visitor for those kind of types the various subtypes can
be consumed in a type safe manner.
Allow disabling the generation of visitors for subtypes with a
discriminator for cases where the visitors are undesirable.
Copy link
Copy Markdown
Member

@wistefan wistefan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants