Author: thomas.diesler(a)jboss.com
Date: 2007-01-05 07:15:13 -0500 (Fri, 05 Jan 2007)
New Revision: 1810
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/utils/HolderUtils.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java
Log:
Fix jdk-1.4 compile issues
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/utils/HolderUtils.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/utils/HolderUtils.java 2007-01-05
12:05:27 UTC (rev 1809)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/utils/HolderUtils.java 2007-01-05
12:15:13 UTC (rev 1810)
@@ -282,6 +282,7 @@
* @param holder JAX-WS holder type
* @return generic value type
*/
+ // [JBBUILD-331] Add support for java.lang.reflect.Type
public static Type getGenericValueType(Type holder)
{
return (holder instanceof ParameterizedType) ?
((ParameterizedType)holder).getActualTypeArguments()[0] : Object.class;
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java 2007-01-05
12:05:27 UTC (rev 1809)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java 2007-01-05
12:15:13 UTC (rev 1810)
@@ -25,7 +25,6 @@
import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
-import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
@@ -306,7 +305,9 @@
return getPropertyXmlName(propertySetter);
}
- private QName getPropertyXmlName(AnnotatedElement propertyMember)
+ // [JBBUILD-330] Add support for java.lang.reflect.AnnotatedElement
+ // private QName getPropertyXmlName(AnnotatedElement propertyMember)
+ private QName getPropertyXmlName(Field propertyMember)
{
QName propertyXmlName = null;
@@ -322,7 +323,26 @@
}
return propertyXmlName;
}
+
+ // [JBBUILD-330] Add support for java.lang.reflect.AnnotatedElement
+ // private QName getPropertyXmlName(AnnotatedElement propertyMember)
+ private QName getPropertyXmlName(Method propertyMember)
+ {
+ QName propertyXmlName = null;
+ XmlElement xmlElement = propertyMember.getAnnotation(XmlElement.class);
+ if (xmlElement != null)
+ propertyXmlName = new QName(xmlElement.namespace(), xmlElement.name());
+ else
+ {
+ XmlAttribute xmlAttribute = propertyMember.getAnnotation(XmlAttribute.class);
+ if (xmlAttribute != null)
+ propertyXmlName = new QName(xmlAttribute.namespace(), xmlAttribute.name());
+ // TODO should any other annotation be examined?
+ }
+ return propertyXmlName;
+ }
+
public void setAccessorFactoryCreator(AccessorFactoryCreator accessorFactoryCreator)
{
this.accessorFactoryCreator = accessorFactoryCreator;
Show replies by date