summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x')
-rw-r--r--sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessor.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessor.java b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessor.java
index 19d3992781..ac92d7b802 100644
--- a/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessor.java
+++ b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessor.java
@@ -162,6 +162,13 @@ public class HeuristicPojoProcessor extends BaseJavaClassVisitor {
return false;
}
+ private static boolean isAnnotated(AnnotatedElement element) {
+ for (Annotation a : element.getAnnotations()) {
+ return true;
+ }
+ return false;
+ }
+
private static boolean isSCAAnnotation(Annotation a) {
return a.annotationType().getName().startsWith("org.oasisopen.sca.annotation.");
}
@@ -261,8 +268,10 @@ public class HeuristicPojoProcessor extends BaseJavaClassVisitor {
}
} else {
if (!type.getPropertyMembers().containsKey(name)) {
- type.getProperties().add(createProperty(name, paramType, genericType));
- type.getPropertyMembers().put(name, new JavaElementImpl(field));
+ if (!isAnnotated(field)) { // if the field has an annotation then its not a property
+ type.getProperties().add(createProperty(name, paramType, genericType));
+ type.getPropertyMembers().put(name, new JavaElementImpl(field));
+ }
}
}
}