cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r602020 - /incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
Date Fri, 07 Dec 2007 08:22:26 GMT
Author: ema
Date: Fri Dec  7 00:22:22 2007
New Revision: 602020

URL: http://svn.apache.org/viewvc?rev=602020&view=rev
Log:
Erased the code for debug

Modified:
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java?rev=602020&r1=602019&r2=602020&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
Fri Dec  7 00:22:22 2007
@@ -23,7 +23,9 @@
 import java.lang.reflect.Method;
 import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.Type;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 import javax.xml.bind.annotation.XmlAttachmentRef;
 import javax.xml.bind.annotation.XmlList;
@@ -48,7 +50,7 @@
 import org.objectweb.asm.Opcodes;
 
 public final class WrapperClassGenerator extends ASMHelper {
-    private List<Class> wrapperBeanList = new java.util.concurrent.CopyOnWriteArrayList<Class>();
+    private Set<Class<?>> wrapperBeans = new HashSet<Class<?>>();
     private InterfaceInfo interfaceInfo;
 
     public WrapperClassGenerator(InterfaceInfo inf) {
@@ -89,9 +91,11 @@
         return list;
     }
 
-    public List<Class> genearte() {
+    public Set<Class<?>> genearte() {
         for (OperationInfo opInfo : interfaceInfo.getOperations()) {
-            if (opInfo.isUnwrappedCapable()) {
+            if (opInfo.isUnwrappedCapable()
+                && opInfo.getUnwrappedOperation().getProperty(ReflectionServiceFactoryBean.WRAPPERGEN_NEEDED)

+                != null) {
                 Method method = (Method)opInfo.getProperty(ReflectionServiceFactoryBean.METHOD);
                 MessageInfo messageInfo = opInfo.getUnwrappedOperation().getInput();
                 createWrapperClass(messageInfo, method, true);
@@ -104,7 +108,7 @@
 
             }
         }
-        return wrapperBeanList;
+        return wrapperBeans;
     }
 
     private void createWrapperClass(MessageInfo messageInfo, Method method, boolean isRequest)
{
@@ -153,18 +157,10 @@
         }
 
         cw.visitEnd();
-        java.io.FileOutputStream fout;
-        try {
-            fout = new java.io.FileOutputStream(new java.io.File("d:/AddNumbers.class"));
-            fout.write(cw.toByteArray());
-        } catch (Exception e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
 
         Class<?> clz = loadClass(className, method.getDeclaringClass(), cw.toByteArray());
         messageInfo.getMessagePart(0).setTypeClass(clz);
-        wrapperBeanList.add(clz);
+        wrapperBeans.add(clz);
 
     }
 



Mime
View raw message