diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-12-13 09:15:11 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-12-13 09:15:11 +0000 |
commit | 903f84ef835228e02546a35fbc84637984492a51 (patch) | |
tree | ae50752efceb44e96cf7940fd20417eaa4938c0b /sca-java-2.x/trunk/modules | |
parent | 7691d02e3dfab3bffcd209d73d945372d1c5cc1a (diff) |
Update context annotation processor to work with both OASIS and Tuscany types of ComponentContext
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1213614 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules')
-rw-r--r-- | sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ContextProcessor.java | 4 |
1 files changed, 2 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/ContextProcessor.java b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ContextProcessor.java index 651ecdbd7e..bf57fbc9fe 100644 --- a/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ContextProcessor.java +++ b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ContextProcessor.java @@ -60,7 +60,7 @@ public class ContextProcessor extends BaseJavaClassVisitor { } Class<?> paramType = method.getParameterTypes()[0]; String name = JavaIntrospectionHelper.toPropertyName(method.getName()); - if (ComponentContext.class.equals(paramType) || RequestContext.class.equals(paramType)) { + if (ComponentContext.class.isAssignableFrom(paramType) || RequestContext.class.equals(paramType)) { JavaElementImpl element = new JavaElementImpl(method, 0); element.setName(name); element.setClassifer(org.apache.tuscany.sca.implementation.java.introspect.impl.Resource.class); @@ -77,7 +77,7 @@ public class ContextProcessor extends BaseJavaClassVisitor { return; } Class<?> paramType = field.getType(); - if (ComponentContext.class.equals(paramType) || RequestContext.class.equals(paramType)) { + if (ComponentContext.class.isAssignableFrom(paramType) || RequestContext.class.equals(paramType)) { JavaElementImpl element = new JavaElementImpl(field); element.setClassifer(Resource.class); JavaResourceImpl resource = new JavaResourceImpl(element); |