cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dand...@apache.org
Subject svn commit: r560541 - in /incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory: DefaultServiceConfiguration.java ReflectionServiceFactoryBean.java
Date Sat, 28 Jul 2007 13:23:37 GMT
Author: dandiep
Date: Sat Jul 28 06:23:36 2007
New Revision: 560541

URL: http://svn.apache.org/viewvc?view=rev&rev=560541
Log:
Add a feature whereby it becomes easier to ignore certain methods when creating a service
model.

Modified:
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java

Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java?view=diff&rev=560541&r1=560540&r2=560541
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java
(original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java
Sat Jul 28 06:23:36 2007
@@ -21,6 +21,7 @@
 
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
+import java.util.Arrays;
 
 import javax.xml.namespace.QName;
 
@@ -186,6 +187,15 @@
             return Boolean.FALSE;
         }
 
+        // Don't do m.equals(method)
+        for (Method m : getServiceFactory().getIgnoredMethods()) {
+            if (m.getName().equals(method.getName()) 
+                && Arrays.equals(method.getParameterTypes(), m.getParameterTypes())
+                && m.getReturnType() == method.getReturnType()) {
+                return Boolean.FALSE;
+            }
+        }
+        
         final int modifiers = method.getModifiers();
 
         if (Modifier.isPublic(modifiers) && !Modifier.isStatic(modifiers)) {

Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?view=diff&rev=560541&r1=560540&r2=560541
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
(original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Sat Jul 28 06:23:36 2007
@@ -115,6 +115,7 @@
     private Invoker invoker;
     private Executor executor;
     private List<String> ignoredClasses = new ArrayList<String>();
+    private List<Method> ignoredMethods = new ArrayList<Method>();
     private SimpleMethodDispatcher methodDispatcher = new SimpleMethodDispatcher();
     private Boolean wrappedStyle;
     private Map<String, Object> properties;
@@ -1440,6 +1441,14 @@
 
     public void setProperties(Map<String, Object> properties) {
         this.properties = properties;
+    }
+
+    public List<Method> getIgnoredMethods() {
+        return ignoredMethods;
+    }
+
+    public void setIgnoredMethods(List<Method> ignoredMethods) {
+        this.ignoredMethods = ignoredMethods;
     }
 
 }



Mime
View raw message