diff options
author | pfullbright | 2012-07-12 22:17:26 +0000 |
---|---|---|
committer | pfullbright | 2012-07-12 22:17:26 +0000 |
commit | 43f2aaa41eb71e78f407e2199270891e5a7c9c4b (patch) | |
tree | 0cae3a14f346a7c64ca66b3cf2f45b6d853f040f /jaxb | |
parent | 15bdfbd06496228430219295d1c7181f67328552 (diff) | |
download | webtools.dali-43f2aaa41eb71e78f407e2199270891e5a7c9c4b.tar.gz webtools.dali-43f2aaa41eb71e78f407e2199270891e5a7c9c4b.tar.xz webtools.dali-43f2aaa41eb71e78f407e2199270891e5a7c9c4b.zip |
Changes to resource model to incorporate new TypeBinding API
Diffstat (limited to 'jaxb')
14 files changed, 56 insertions, 44 deletions
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/Accessor.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/Accessor.java index 3aa84db340..3e0d6f5661 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/Accessor.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/Accessor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. + * Copyright (c) 2011, 2012 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html @@ -13,6 +13,7 @@ import java.util.Collection; import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute; import org.eclipse.jpt.common.core.resource.java.JavaResourceField; import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod; +import org.eclipse.jpt.common.core.utility.jdt.TypeBinding; import org.eclipse.jpt.jaxb.core.context.java.JavaContextNode; /** @@ -64,35 +65,37 @@ public interface Accessor public static final String OBJECT_CLASS_NAME = Object.class.getName(); public static String getBaseTypeName(JavaResourceAttribute attribute) { - if (attribute.typeIsArray()) { - if (BYTE_ARRAY_CLASS_NAME.equals(attribute.getTypeName())) { + TypeBinding typeBinding = attribute.getTypeBinding(); + if (typeBinding.isArray()) { + if (BYTE_ARRAY_CLASS_NAME.equals(typeBinding.getQualifiedName())) { return BYTE_ARRAY_CLASS_NAME; } - else if (attribute.getTypeArrayDimensionality() == 1) { - return attribute.getTypeArrayComponentTypeName(); + else if (typeBinding.getArrayDimensionality() == 1) { + return typeBinding.getArrayComponentTypeName(); } } - else if (attribute.typeIsSubTypeOf(COLLECTION_CLASS_NAME)) { - if (attribute.getTypeTypeArgumentNamesSize() == 1) { - return attribute.getTypeTypeArgumentName(0); + else if (typeBinding.isSubTypeOf(COLLECTION_CLASS_NAME)) { + if (typeBinding.getTypeArgumentNamesSize() == 1) { + return typeBinding.getTypeArgumentName(0); } return OBJECT_CLASS_NAME; } - return attribute.getTypeName(); + return typeBinding.getQualifiedName(); } /** * @see JaxbPersistentAttribute#isJavaResourceAttributeCollectionType() */ public static boolean isCollectionType(JavaResourceAttribute attribute) { - if (attribute.typeIsArray()) { - if (attribute.getTypeArrayDimensionality() == 1 - && ! BYTE_ARRAY_CLASS_NAME.equals(attribute.getTypeName())) { + TypeBinding typeBinding = attribute.getTypeBinding(); + if (typeBinding.isArray()) { + if (typeBinding.getArrayDimensionality() == 1 + && ! BYTE_ARRAY_CLASS_NAME.equals(typeBinding.getQualifiedName())) { return true; } return false; } - else if (attribute.typeIsSubTypeOf(COLLECTION_CLASS_NAME)) { + else if (typeBinding.isSubTypeOf(COLLECTION_CLASS_NAME)) { return true; } diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/AbstractJaxbProject.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/AbstractJaxbProject.java index 35af48af0d..8a3575ba13 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/AbstractJaxbProject.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/AbstractJaxbProject.java @@ -771,7 +771,7 @@ public abstract class AbstractJaxbProject public JavaResourceAbstractType getJavaResourceType(String typeName) { for (JavaResourceAbstractType type : this.getJavaResourceTypes()) { - if (type.getQualifiedName().equals(typeName)) { + if (type.getTypeBinding().getQualifiedName().equals(typeName)) { return type; } } diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextRoot.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextRoot.java index 373f603335..e7e5170c90 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextRoot.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextRoot.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2011 Oracle. All rights reserved. + * Copyright (c) 2010, 2012 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -94,7 +94,7 @@ public abstract class AbstractJaxbContextRoot // process types with annotations and in jaxb.index files for (JavaResourceAbstractType resourceType : calculateInitialTypes()) { - totalTypeNames.add(resourceType.getQualifiedName()); + totalTypeNames.add(resourceType.getTypeBinding().getQualifiedName()); addType_(buildType(resourceType)); } @@ -202,7 +202,7 @@ public abstract class AbstractJaxbContextRoot // while there are resource types to process or types to scan, continue to do so while (! resourceTypesToProcess.isEmpty() || ! typesToScan.isEmpty()) { for (JavaResourceAbstractType resourceType : new SnapshotCloneIterable<JavaResourceAbstractType>(resourceTypesToProcess)) { - String className = resourceType.getQualifiedName(); + String className = resourceType.getTypeBinding().getQualifiedName(); typesToRemove.remove(className); totalTypes.add(className); typesToScan.add(className); @@ -334,7 +334,7 @@ public abstract class AbstractJaxbContextRoot protected void processType(JavaResourceAbstractType resourceType, Set<String> typesToUpdate, boolean defaultMapped) { JaxbType.Kind jaxbTypeKind = calculateJaxbTypeKind(resourceType); - String className = resourceType.getQualifiedName(); + String className = resourceType.getTypeBinding().getQualifiedName(); if (this.types.containsKey(className)) { JaxbType type = this.types.get(className); diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAdaptableAttributeMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAdaptableAttributeMapping.java index 690bd62843..f560b9e093 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAdaptableAttributeMapping.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAdaptableAttributeMapping.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. + * Copyright (c) 2011, 2012 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html @@ -157,7 +157,7 @@ public abstract class AbstractJavaAdaptableAttributeMapping<A extends Annotation // see if there is an xml adapter on the *type's* package JavaResourceAbstractType resourceType = getJaxbProject().getJavaResourceType(boundTypeName); if (resourceType != null) { - pkg = getContextRoot().getPackage(resourceType.getPackageName()); + pkg = getContextRoot().getPackage(resourceType.getTypeBinding().getPackageName()); pkgInfo = (pkg == null) ? null : pkg.getPackageInfo(); if (pkgInfo != null) { XmlJavaTypeAdapter xmlJavaTypeAdapter = pkgInfo.getXmlJavaTypeAdapter(boundTypeName); diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaType.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaType.java index 2b702eea08..8e59b6682e 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaType.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaType.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2011 Oracle. All rights reserved. + * Copyright (c) 2010, 2012 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html @@ -244,11 +244,11 @@ public abstract class AbstractJavaType } public String getFullyQualifiedName() { - return this.resourceType.getQualifiedName(); + return this.resourceType.getTypeBinding().getQualifiedName(); } public String getPackageName() { - return this.resourceType.getPackageName(); + return this.resourceType.getTypeBinding().getPackageName(); } public JaxbPackage getJaxbPackage() { diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/FieldAccessor.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/FieldAccessor.java index d351834091..1eb4de5840 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/FieldAccessor.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/FieldAccessor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. + * Copyright (c) 2011, 2012 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -42,7 +42,7 @@ public class FieldAccessor } public boolean isJavaResourceAttributeTypeSubTypeOf(String typeName) { - return this.getJavaResourceAttribute().typeIsSubTypeOf(typeName); + return this.getJavaResourceAttribute().getTypeBinding().isSubTypeOf(typeName); } public JavaResourceField getResourceField() { diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributesContainer.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributesContainer.java index 4d970adc56..b608e7280c 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributesContainer.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributesContainer.java @@ -215,7 +215,7 @@ public class GenericJavaAttributesContainer return true; } //Lists do not have to have a corresponding setter method - else if (getterMethod.getTypeName().equals("java.util.List")) { //$NON-NLS-1$ + else if (getterMethod.getTypeBinding().getQualifiedName().equals("java.util.List")) { //$NON-NLS-1$ return true; } else if (getterMethod.isAnnotated()) { @@ -233,7 +233,7 @@ public class GenericJavaAttributesContainer } } //Lists do not have to have a corresponding setter method - else if (getterMethod.getTypeName().equals("java.util.List")) { //$NON-NLS-1$ + else if (getterMethod.getTypeBinding().getQualifiedName().equals("java.util.List")) { //$NON-NLS-1$ return true; } else if (getterMethod.isAnnotated()) { @@ -524,7 +524,7 @@ public class GenericJavaAttributesContainer return false; } - String returnTypeName = resourceMethod.getTypeName(); + String returnTypeName = resourceMethod.getTypeBinding().getQualifiedName(); if (returnTypeName == null) { return false; // DOM method bindings can have a null name } @@ -550,7 +550,7 @@ public class GenericJavaAttributesContainer } private static boolean methodIsBooleanGetter(JavaResourceMethod resourceMethod) { - String returnTypeName = resourceMethod.getTypeName(); + String returnTypeName = resourceMethod.getTypeBinding().getQualifiedName(); String name = resourceMethod.getMethodName(); boolean booleanGetter = false; if (name.startsWith("is")) { //$NON-NLS-1$ @@ -608,7 +608,7 @@ public class GenericJavaAttributesContainer */ private static JavaResourceMethod getValidSiblingSetMethod(JavaResourceMethod getMethod, Collection<JavaResourceMethod> resourceMethods) { String capitalizedSetAttributeName = "set" + StringTools.capitalize(getMethod.getName());//$NON-NLS-1$ - String parameterTypeErasureName = getMethod.getTypeName(); + String parameterTypeErasureName = getMethod.getTypeBinding().getQualifiedName(); for (JavaResourceMethod sibling : resourceMethods) { if ((sibling.getParametersSize() == 1) && sibling.getMethodName().equals(capitalizedSetAttributeName) @@ -633,7 +633,7 @@ public class GenericJavaAttributesContainer if (resourceMethod.isConstructor()) { return false; } - String rtName = resourceMethod.getTypeName(); + String rtName = resourceMethod.getTypeBinding().getQualifiedName(); if (rtName == null) { return false; // DOM method bindings can have a null name } diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaClassMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaClassMapping.java index f846e4d692..f8a7b03cf2 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaClassMapping.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaClassMapping.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. + * Copyright (c) 2011, 2012 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html @@ -447,7 +447,7 @@ public class GenericJavaClassMapping protected JaxbClassMapping findSuperclass() { JavaResourceType resourceType = getSuperclass(getJavaResourceType()); while (resourceType != null && resourceType != this) { - JaxbType jaxbType = getJaxbProject().getContextRoot().getType(resourceType.getQualifiedName()); + JaxbType jaxbType = getJaxbProject().getContextRoot().getType(resourceType.getTypeBinding().getQualifiedName()); // if the superclass is not a class, return null if (jaxbType == null || jaxbType.getKind() != JaxbType.Kind.CLASS) { diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaElementFactoryMethod.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaElementFactoryMethod.java index 61e1c75034..844ba811b2 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaElementFactoryMethod.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaElementFactoryMethod.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2011 Oracle. All rights reserved. + * Copyright (c) 2010, 2012 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -225,7 +225,7 @@ public class GenericJavaElementFactoryMethod protected void validateMethodReturnType( JavaResourceMethod resourceMethod, List<IMessage> messages, CompilationUnit astRoot) { - if (! JAXB.JAXB_ELEMENT.equals(resourceMethod.getTypeName())) { + if (! JAXB.JAXB_ELEMENT.equals(resourceMethod.getTypeBinding().getQualifiedName())) { messages.add( DefaultValidationMessages.buildMessage( IMessage.HIGH_SEVERITY, diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaTypeXmlJavaTypeAdapter.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaTypeXmlJavaTypeAdapter.java index 10a874665f..aae5467d94 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaTypeXmlJavaTypeAdapter.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaTypeXmlJavaTypeAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. + * Copyright (c) 2011, 2012 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -28,7 +28,7 @@ public class GenericJavaTypeXmlJavaTypeAdapter // ********** type ********** @Override protected String buildDefaultType() { - return getParent().getJavaResourceType().getQualifiedName(); + return getParent().getJavaResourceType().getTypeBinding().getQualifiedName(); } } diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAdapter.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAdapter.java index b71db30e34..6723b50a33 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAdapter.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. + * Copyright (c) 2011, 2012 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html @@ -76,7 +76,7 @@ public class GenericJavaXmlAdapter protected String[] findBoundAndValueTypes(JavaResourceType resourceType) { for (JavaResourceMethod resourceMethod : resourceType.getMethods()) { if (MARSHAL_METHOD_NAME.equals(resourceMethod.getName()) && resourceMethod.getParametersSize() == 1) { - String valueType = resourceMethod.getTypeName(); + String valueType = resourceMethod.getTypeBinding().getQualifiedName(); String boundType = resourceMethod.getParameterTypeName(0); return new String[] { boundType, valueType }; } diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRegistry.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRegistry.java index 2a69368779..f4cea3511f 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRegistry.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRegistry.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2011 Oracle. All rights reserved. + * Copyright (c) 2010, 2012 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html @@ -130,7 +130,7 @@ public class GenericJavaXmlRegistry } protected static boolean methodReturnTypeIsJAXBElement(JavaResourceMethod method) { - return method.typeIsSubTypeOf(JAXB.XML_ELEMENT); + return method.getTypeBinding().isSubTypeOf(JAXB.XML_ELEMENT); } diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/PropertyAccessor.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/PropertyAccessor.java index 125950698e..bbbc39dded 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/PropertyAccessor.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/PropertyAccessor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Oracle. All rights reserved. + * Copyright (c) 2011, 2012 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -54,7 +54,7 @@ public class PropertyAccessor JavaResourceAttribute getterMethod = getResourceGetterMethod(); //it's invalid to have a setter without a getter, so just return false in this case //rather than attempting to use the setter's parameters - return getterMethod == null ? false : getterMethod.typeIsSubTypeOf(typeName); + return getterMethod == null ? false : getterMethod.getTypeBinding().isSubTypeOf(typeName); } public JavaResourceMethod getResourceGetterMethod() { diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaElementFactoryMethod.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaElementFactoryMethod.java index 2322c545a0..54718bab6c 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaElementFactoryMethod.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaElementFactoryMethod.java @@ -1,3 +1,12 @@ +/******************************************************************************* + * Copyright (c) 2012 Oracle. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0, which accompanies this distribution + * and is available at http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Oracle - initial API and implementation + *******************************************************************************/ package org.eclipse.jpt.jaxb.eclipselink.core.internal.context.java; import java.util.List; @@ -23,7 +32,7 @@ public class ELJavaElementFactoryMethod protected void validateMethodReturnType( JavaResourceMethod resourceMethod, List<IMessage> messages, CompilationUnit astRoot) { - if (! resourceMethod.typeIsSubTypeOf(JAXB.JAXB_ELEMENT)) { + if (! resourceMethod.getTypeBinding().isSubTypeOf(JAXB.JAXB_ELEMENT)) { messages.add( ELJaxbValidationMessageBuilder.buildMessage( IMessage.HIGH_SEVERITY, |