package introspection;

import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;

@Exercice(2)
public class Identity{
	
	
	public static void displayID(Class<?> c){
		System.out.print(c);
		System.out.print(" étend ");
		Class<?> s=c.getSuperclass();
		System.out.print(s);
		System.out.print(" implémente");
		for(Class<?> i : c.getInterfaces())
			System.out.print(" "+i);
		System.out.println();
		System.out.println("Constructeurs:");
		for(Constructor<?> ct : c.getDeclaredConstructors())
			System.out.println(ct);
		System.out.println("Champs:");
		for(Field f : c.getDeclaredFields())
			System.out.println(f);
		System.out.println("Méthodes:");
		for(Method m : c.getDeclaredMethods())
			System.out.println(m);		
	}
	
		
	public static void main(String[] args) {
		displayID(ConcreteFraction.class);
	}
}

	
