I have a base interface FunctionCredential
:
public interface FunctionPrivilege {}
and several other interfaces extending this interface:
public interface ReadSomethingPrivilege extends FunctionPrivilege {}
public interface WriteSomethingPrivilege extends FunctionPrivilege {}
...
The interfaces are used as marker interfaces only (no implementations). I want to discover interfaces (all reachable using the current context classloader), not check known interfaces.
Within a Java application, can I somehow discover (list) those interface classes at runtime? If so, how would I do that?
Note: CDI does something similar, also discovering/scanning classes at runtime.