AnnotationVisitor av0 = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlElement;", true); av0.visit("name", name); if (Boolean.TRUE.equals(factory.isWrapperPartQualified(mpi))) { fv.visitEnd();
for (Annotation ann : jaxbAnnos) { if (ann instanceof XmlMimeType) { av0 = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlMimeType;", true); av0.visit("value", ((XmlMimeType)ann).value()); av0.visitEnd(); } else if (ann instanceof XmlJavaTypeAdapter) { av0 = fv.visitAnnotation("Ljavax/xml/bind/annotation/adapters/XmlJavaTypeAdapter;", true); generateXmlJavaTypeAdapter(av0, (XmlJavaTypeAdapter)ann); av0.visitEnd(); } else if (ann instanceof XmlAttachmentRef) { av0 = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlAttachmentRef;", true); av0.visitEnd(); } else if (ann instanceof XmlList) { av0 = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlList;", true); av0.visitEnd(); } else if (ann instanceof XmlElement) { addedEl = true; XmlElement el = (XmlElement)ann; av0 = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlElement;", true); if ("##default".equals(el.name())) { av0.visit("name", name); } else if (ann instanceof XmlElementWrapper) { XmlElementWrapper el = (XmlElementWrapper)ann; av0 = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlElementWrapper;", true); av0.visit("name", el.name()); av0.visit("nillable", el.nillable());
ofName, null, null); fv.visitEnd();
private static synchronized void createFixedAnyConstructor() { if (fixedAnyConstructor != null) { return; } ASMHelper helper = new ASMHelper(); ClassWriter cw = helper.createClassWriter(); FieldVisitor fv; cw.visit(Opcodes.V1_6, Opcodes.ACC_PUBLIC + Opcodes.ACC_SUPER, "org/apache/cxf/binding/corba/utils/FixedAnyImpl", null, "com/sun/corba/se/impl/corba/AnyImpl", null); cw.visitSource("FixedAnyImpl.java", null); fv = cw.visitField(0, "obj", "Lorg/omg/CORBA/portable/Streamable;", null, null); fv.visitEnd(); addFixedAnyConstructor(helper, cw); addInsertOverride(helper, cw); addExtractOverride(helper, cw); addWriteOverride(helper, cw); addReadOverride(helper, cw); cw.visitEnd(); byte[] b = cw.toByteArray(); Class<?> c = helper.loadClass("org.apache.cxf.binding.corba.utils.FixedAnyImpl", CorbaAnyHelper.class, b); try { fixedAnyConstructor = c.getConstructor(ORB.class, Any.class); } catch (Exception e) { //shouldn't happen since we generated that constructor } }
AnnotationVisitor av0 = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlElement;", true); av0.visit("name", name); if (Boolean.TRUE.equals(factory.isWrapperPartQualified(mpi))) { fv.visitEnd();
for (Annotation ann : jaxbAnnos) { if (ann instanceof XmlMimeType) { av0 = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlMimeType;", true); av0.visit("value", ((XmlMimeType)ann).value()); av0.visitEnd(); } else if (ann instanceof XmlJavaTypeAdapter) { av0 = fv.visitAnnotation("Ljavax/xml/bind/annotation/adapters/XmlJavaTypeAdapter;", true); generateXmlJavaTypeAdapter(av0, (XmlJavaTypeAdapter)ann); av0.visitEnd(); } else if (ann instanceof XmlAttachmentRef) { av0 = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlAttachmentRef;", true); av0.visitEnd(); } else if (ann instanceof XmlList) { av0 = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlList;", true); av0.visitEnd(); } else if (ann instanceof XmlElement) { addedEl = true; XmlElement el = (XmlElement)ann; av0 = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlElement;", true); if ("##default".equals(el.name())) { av0.visit("name", name); } else if (ann instanceof XmlElementWrapper) { XmlElementWrapper el = (XmlElementWrapper)ann; av0 = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlElementWrapper;", true); av0.visit("name", el.name()); av0.visit("nillable", el.nillable());