Skip to content

getSubTypesOf returning anonymous types defined in test classes #462

@raaghavraaj

Description

@raaghavraaj

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions