camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jans...@apache.org
Subject [05/21] git commit: use canonical names of inner classes when generating source
Date Mon, 08 Sep 2014 13:57:42 GMT
use canonical names of inner classes when generating source


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a4b235ca
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a4b235ca
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a4b235ca

Branch: refs/heads/master
Commit: a4b235ca34466f62b842a893200c30cd8eec5346
Parents: b13c88f
Author: Jonathan Anstey <janstey@gmail.com>
Authored: Thu Jul 3 15:22:00 2014 -0230
Committer: Jonathan Anstey <janstey@gmail.com>
Committed: Mon Sep 8 09:06:08 2014 -0230

----------------------------------------------------------------------
 .../org/apache/camel/maven/ApiComponentGeneratorMojo.java | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/a4b235ca/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/ApiComponentGeneratorMojo.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/ApiComponentGeneratorMojo.java
b/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/ApiComponentGeneratorMojo.java
index 07532f8..3008be8 100644
--- a/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/ApiComponentGeneratorMojo.java
+++ b/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/ApiComponentGeneratorMojo.java
@@ -230,11 +230,17 @@ public class ApiComponentGeneratorMojo extends AbstractApiMethodBaseMojo
{
     }
 
     public static String getApiMethod(String proxyClass) {
-        return proxyClass.substring(proxyClass.lastIndexOf('.') + 1) + "ApiMethod";
+        String proxyClassWithCanonicalName = getProxyClassWithCanonicalName(proxyClass);
       
+        return proxyClassWithCanonicalName.substring(proxyClassWithCanonicalName.lastIndexOf('.')
+ 1) + "ApiMethod";
     }
 
     public static String getEndpointConfig(String proxyClass) {
-        return proxyClass.substring(proxyClass.lastIndexOf('.') + 1) + "EndpointConfiguration";
+        String proxyClassWithCanonicalName = getProxyClassWithCanonicalName(proxyClass);
+        return proxyClassWithCanonicalName.substring(proxyClassWithCanonicalName.lastIndexOf('.')
+ 1) + "EndpointConfiguration";
+    }
+
+    private static String getProxyClassWithCanonicalName(String proxyClass) {
+        return proxyClass.replace("$", "");
     }
 
     public static String getEnumConstant(String enumValue) {


Mime
View raw message