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

Support templates defined in nested classes #12

Closed
timtebeek opened this issue Aug 11, 2023 · 0 comments · Fixed by #13
Closed

Support templates defined in nested classes #12

timtebeek opened this issue Aug 11, 2023 · 0 comments · Fixed by #13
Labels
enhancement New feature or request

Comments

@timtebeek
Copy link
Contributor

What problem are you trying to solve?

Nested classes are a convenient way of grouping relevant recipes together, that would otherwise be spread over a large number of files and harder to maintain. Consider the case where we replace StringUtils methods; there it would be convenient to have a wrapper ApacheCommonsStringUtils class that contains multiple nested classes for each of the replaced methods.

When I try to do that now a wrapper Recipe class is generated, but the inner Recipe classes aren't static, so creating instances of those fails with serialization.

Describe the solution you'd like

Static inner classes.

Have you considered any alternatives or workarounds?

Not really; open to suggestions.

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant