static Class<?> createAnnotationsProxy(ClassLoader loader, AnnotationsAttribute annotations) {
String proxyName = ProxyDefinitionStore.getProxyName();
ClassFile proxy = new ClassFile(false, proxyName, "java.lang.Object");
proxy.setAccessFlags(AccessFlag.PUBLIC);
AttributeInfo a = annotations.copy(proxy.getConstPool(), Collections.EMPTY_MAP);
proxy.addAttribute(a);
try {
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(bytes);
try {
proxy.write(dos);