@SuppressWarnings({ "unchecked" })
	protected <T> T getTargetObject(Object proxy, Class<T> targetClass) throws Exception {
		if (AopUtils.isJdkDynamicProxy(proxy)) {
			return (T) ((Advised) proxy).getTargetSource().getTarget();
		}
		else {
			return (T) proxy; // expected to be cglib proxy then, which is simply a
			// specialized class
		}
	}
Eureka-specific implementation of service instance {@link Registration}.

@author Spencer Gibb
@author Tim Ysewyn
spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/serviceregistry/EurekaRegistration.java