private <T> T newProxy(Class<? extends Object> cls, MethodHandler methodHandler) {
final ProxyFactory proxyFactory = new ProxyFactory();
proxyFactory.setSuperclass(cls);
proxyFactory.setInterfaces(ArrayExtensions.combine(cls.getInterfaces(), new Class<?>[] { JavassistEnhanced.class }));
proxyFactory.setFilter(new MethodFilter() {
@Override
public boolean isHandled(final Method m) {
// ignore finalize()
return !m.getName().equals("finalize");
}