package introspection;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

@Exercice(5)
public class Handler implements InvocationHandler {

	private Fraction f;
	
	public Handler(Fraction f){this.f =f;}
	
	
	
	@Override
	public Object invoke(Object proxy, Method method, Object[] args)
			throws Throwable {
		System.out.println("debut "+method.getName()+" objet "+f);
		Object o=method.invoke(f, args);
		System.out.println("fin "+method.getName()+" objet "+f);
		return o;
	}

}
