Is it possible to get list of all interfaces which extends base interface without having any bean implemented any interface in java at runtime?
Example:
interface A {}
interface B extends A{}
interface C extends A{}
interface D extends C{}
public Class<? extends A>[] getAllInterfaces(A.class);
Method getAllInterfaces()
should return all interfaces which extends A: {B, C, D}
Aucun commentaire:
Enregistrer un commentaire