cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r580202 - in /incubator/cxf/trunk/tools: common/src/main/java/org/apache/cxf/tools/util/ wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/ wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/fro...
Date Fri, 28 Sep 2007 03:15:48 GMT
Author: mmao
Date: Thu Sep 27 20:15:47 2007
New Revision: 580202

URL: http://svn.apache.org/viewvc?rev=580202&view=rev
Log:
Fix a deprecated method


Modified:
    incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ClassCollector.java
    incubator/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/XmlSeeAlsoAnnotator.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/XmlSeeAlsoAnnotatorTest.java

Modified: incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ClassCollector.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ClassCollector.java?rev=580202&r1=580201&r2=580202&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ClassCollector.java
(original)
+++ incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ClassCollector.java
Thu Sep 27 20:15:47 2007
@@ -36,7 +36,7 @@
     private final Map<String, String> clientClassNames = new HashMap<String, String>();
     private final Map<String, String> serverClassNames = new HashMap<String, String>();
 
-    private final Set<String> typesFactory = new HashSet<String>();
+    private final Set<String> typesPackages = new HashSet<String>();
 
     public boolean containSeiClass(String packagename, String type) {
         return seiClassNames.containsKey(key(packagename, type));
@@ -86,8 +86,8 @@
         return packagename + "#" + type;
     }
 
-    public Set<String> getTypesFactory() {
-        return typesFactory;
+    public Set<String> getTypesPackages() {
+        return typesPackages;
     }
 
     public List<String> getGeneratedFileInfo() {

Modified: incubator/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java?rev=580202&r1=580201&r2=580202&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
Thu Sep 27 20:15:47 2007
@@ -299,10 +299,8 @@
                 S2JJAXBModel schem2JavaJaxbModel = (S2JJAXBModel)rawJaxbModelGenCode;
 
                 ClassCollector classCollector = context.get(ClassCollector.class);
-                for (String cls : schem2JavaJaxbModel.getClassList()) {
-                    if (cls.endsWith("ObjectFactory")) {
-                        classCollector.getTypesFactory().add(cls);
-                    }
+                for (JClass cls : schem2JavaJaxbModel.getAllObjectFactories()) {
+                    classCollector.getTypesPackages().add(cls._package().name());
                 }
 
                 JCodeModel jcodeModel = schem2JavaJaxbModel.generateCode(null, null);

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/XmlSeeAlsoAnnotator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/XmlSeeAlsoAnnotator.java?rev=580202&r1=580201&r2=580202&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/XmlSeeAlsoAnnotator.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/XmlSeeAlsoAnnotator.java
Thu Sep 27 20:15:47 2007
@@ -33,7 +33,7 @@
     }
     
     public void annotate(JavaAnnotatable  ja) {
-        if (collector == null || collector.getTypesFactory().isEmpty()) {
+        if (collector == null || collector.getTypesPackages().isEmpty()) {
             return;
         }
 
@@ -47,11 +47,11 @@
         JavaAnnotation jaxbAnnotation = new JavaAnnotation("XmlSeeAlso");
         intf.addImport("javax.xml.bind.annotation.XmlSeeAlso");
         
-        for (String factory : collector.getTypesFactory()) {
-            if ((intf.getPackageName() + ".ObjectFactory").equals(factory)) {
+        for (String pkg : collector.getTypesPackages()) {
+            if (pkg.equals(intf.getPackageName())) {
                 jaxbAnnotation.getClassList().add("ObjectFactory");
             } else {
-                jaxbAnnotation.getClassList().add(factory);
+                jaxbAnnotation.getClassList().add(pkg + ".ObjectFactory");
             }
         }
         intf.addAnnotation(jaxbAnnotation.toString());

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/XmlSeeAlsoAnnotatorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/XmlSeeAlsoAnnotatorTest.java?rev=580202&r1=580201&r2=580202&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/XmlSeeAlsoAnnotatorTest.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/XmlSeeAlsoAnnotatorTest.java
Thu Sep 27 20:15:47 2007
@@ -35,7 +35,7 @@
         assertFalse(intf.getImports().hasNext());
 
         ClassCollector collector = new ClassCollector();
-        collector.getTypesFactory().add(ObjectFactory.class.getName());
+        collector.getTypesPackages().add(ObjectFactory.class.getPackage().getName());
         intf.annotate(new XmlSeeAlsoAnnotator(collector));
 
         Iterator iter = intf.getImports();



Mime
View raw message