You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ga...@apache.org on 2007/07/12 22:33:13 UTC
svn commit: r555747 -
/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/ConverterUtils.java
Author: gawor
Date: Thu Jul 12 13:33:12 2007
New Revision: 555747
URL: http://svn.apache.org/viewvc?view=rev&rev=555747
Log:
convert Holder with arrays
Modified:
webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/ConverterUtils.java
Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/ConverterUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/ConverterUtils.java?view=diff&rev=555747&r1=555746&r2=555747
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/ConverterUtils.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/ConverterUtils.java Thu Jul 12 13:33:12 2007
@@ -33,6 +33,7 @@
import javax.xml.ws.WebServiceRef;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
+import java.lang.reflect.GenericArrayType;
import java.lang.reflect.Method;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
@@ -205,13 +206,7 @@
paramType = paramType + "<";
for (int i = 0; i < genericTypes.length; i++) {
Type type = genericTypes[i];
- if (type instanceof Class) {
- paramType = paramType + ((Class)type).getName();
- } else if (type instanceof ParameterizedType) {
- paramType = getFullType((ParameterizedType)type, paramType);
- } else if (type instanceof WildcardType) {
- paramType = paramType + "?";
- }
+ paramType = getType(type, paramType);
// Set string for more parameters OR close the generic if this is the last one.
if (i != genericTypes.length - 1) {
@@ -224,4 +219,17 @@
}
return paramType;
}
+
+ private static String getType(Type type, String paramType) {
+ if (type instanceof Class) {
+ paramType = paramType + ((Class)type).getName();
+ } else if (type instanceof ParameterizedType) {
+ paramType = getFullType((ParameterizedType)type, paramType);
+ } else if (type instanceof WildcardType) {
+ paramType = paramType + "?";
+ } else if (type instanceof GenericArrayType) {
+ paramType = getType(((GenericArrayType)type).getGenericComponentType(), paramType) + "[]";
+ }
+ return paramType;
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org