for (Annotation ann : annotated.getAnnotations()) {
Class<?> annType = ann.annotationType();
if (annType.isAnnotationPresent(ProxyType.class)) {
ProxyType proxyType
= (ProxyType) annType.getAnnotation(ProxyType.class);
Class<?> factoryClass = proxyType.defaultFactory();
ProtocolProxyFactory proxyFactory
= (ProtocolProxyFactory) factoryClass.newInstance();
proxyFactory.setProxyType(ann);
proxyFactory.setAnnotated(annotated);