summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/interface-java/src/main
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-10-28 19:29:50 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-10-28 19:29:50 +0000
commit3ab338ad0b521192e72a4e1da2e6fae0f45b38ae (patch)
tree14b6aab8959c1e79b4578a1617966c96cf329a45 /java/sca/modules/interface-java/src/main
parentc13b16cafe0cd2999754186270f6b8e03baefe6d (diff)
Pass ServiceRegistry via extensionPointRegistry to remove static references
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@830738 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/interface-java/src/main')
-rw-r--r--java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/DefaultJavaInterfaceFactory.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/DefaultJavaInterfaceFactory.java b/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/DefaultJavaInterfaceFactory.java
index 85af53068a..1e36b95da3 100644
--- a/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/DefaultJavaInterfaceFactory.java
+++ b/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/DefaultJavaInterfaceFactory.java
@@ -26,7 +26,6 @@ import java.util.logging.Logger;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.extensibility.ServiceDeclaration;
-import org.apache.tuscany.sca.extensibility.ServiceDiscovery;
import org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceFactoryImpl;
import org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor;
@@ -38,13 +37,13 @@ import org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor;
public class DefaultJavaInterfaceFactory extends JavaInterfaceFactoryImpl implements JavaInterfaceFactory {
private static final Logger logger = Logger.getLogger(DefaultJavaInterfaceFactory.class.getName());
- private ExtensionPointRegistry extensionPointRegistry;
+ private ExtensionPointRegistry registry;
// private Monitor monitor = null;
private boolean loadedVisitors;
public DefaultJavaInterfaceFactory(ExtensionPointRegistry registry) {
super();
- this.extensionPointRegistry = registry;
+ this.registry = registry;
}
@Override
@@ -64,7 +63,7 @@ public class DefaultJavaInterfaceFactory extends JavaInterfaceFactoryImpl implem
// Get the databinding service declarations
Collection<ServiceDeclaration> visitorDeclarations;
try {
- visitorDeclarations = ServiceDiscovery.getInstance().getServiceDeclarations(JavaInterfaceVisitor.class, true);
+ visitorDeclarations = registry.getServiceDiscovery().getServiceDeclarations(JavaInterfaceVisitor.class, true);
} catch (IOException e) {
throw new IllegalStateException(e);
}
@@ -77,7 +76,7 @@ public class DefaultJavaInterfaceFactory extends JavaInterfaceFactoryImpl implem
try {
Constructor<JavaInterfaceVisitor> constructor = visitorClass.getConstructor(ExtensionPointRegistry.class);
- visitor = constructor.newInstance(extensionPointRegistry);
+ visitor = constructor.newInstance(registry);
} catch (NoSuchMethodException e) {
visitor = visitorClass.newInstance();
}