Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a callback to user code when resolving a polymorphic type #138

Closed

Conversation

big-andy-coates
Copy link
Contributor

@big-andy-coates big-andy-coates commented Jan 23, 2021

fixes: #137

Alternative fix: (which I think I prefer) #139

Adds a callback to SubclassesResolver that is invoked when the generator is about to search for subtypes of a type annotated with @JsonTypeInfo, passing the type being resolved:

  def resolving(_type: JavaType)def resolving(_type: JavaType) = {}

This allows users to, optionally, execute custom code before ClassGraph attempts to determine the subtypes.

@big-andy-coates
Copy link
Contributor Author

Thoughts on this change @mbknor. Feel free to close the PR is you're not going to merge / adopt...

1 similar comment
@big-andy-coates
Copy link
Contributor Author

Thoughts on this change @mbknor. Feel free to close the PR is you're not going to merge / adopt...

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.

Provide callback to user code before trying to resolve @JsonTypeInfo types
1 participant