private Object getCGLIBProxy(Class<? extends MethodIntercepter> interceptorClass, Long timeInMillis,
Class<?> fieldType, Object fieldInstance) throws InstantiationException, IllegalAccessException {
LOG.debug("The field of type :" + fieldType + " will be proxied using CGLIB proxies.");
Enhancer enhancer = new Enhancer();
enhancer.setSuperclass(fieldType);
InternalInterceptor cglibInterceptor = new InternalInterceptor();
cglibInterceptor.setTargetInstance(fieldInstance);
cglibInterceptor.setUserIntercepter(interceptorClass.newInstance());
cglibInterceptor.setExpectedRunTime(timeInMillis);
cglibInterceptor.addObserver(durationObserver);
enhancer.setCallback(cglibInterceptor);
return enhancer.create();
}