Given an instance of any class type, how to find out which parent class and/or traits it inherits from or implements? <p>Suppose there are class/trait definitions as follows:</p> <pre><code>trait T1 {} trait T2 {} abstract class A{} class B {} class C extends A with T1 with T2 {} val b = new B with T1 val c = new C </code></pre> <p>Given the instance of b and c, how do I get their inheritance information (i.e. to know that b implements T1, and c implements A, T1 and T2) ? </p> <p>Thanks for your help.</p>