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

getSubTypesOf returning anonymous types defined in test classes #462

Open
raaghavraaj opened this issue May 15, 2023 · 0 comments
Open

getSubTypesOf returning anonymous types defined in test classes #462

raaghavraaj opened this issue May 15, 2023 · 0 comments

Comments

@raaghavraaj
Copy link

The issue is the same as this but the thread is closed so I am going ahead to create a new one. I am currently getting around the fix of this by doing something like this:

final Set<Class<? extends BaseClass>> subTypes =
       new Reflections(new ConfigurationBuilder().forPackages(myPackage).filterInputsBy(new FilterBuilder().exclude("test")))
           .getSubTypesOf(BaseClass.class);

It looks not so elegant and slightly hacky. Is there any elegant solution to this or a feature available in the latest Reflections library?

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

No branches or pull requests

1 participant