diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-12 07:50:47 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-12 07:50:47 +0000 |
commit | 329f16d7c31de8817bda9cdab90f0c08425cd2b1 (patch) | |
tree | 574fb73e7e24ebd468e32f412ae5d3cca628c034 /java/sca/modules/node-api/src/main | |
parent | 975eb6fdba4fe8683e85a7297f649d1502c933bf (diff) |
Minor cosmetic/formatting changes
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@784017 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/node-api/src/main')
-rw-r--r-- | java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java index 23efdf729a..94df876a31 100644 --- a/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java +++ b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java @@ -90,9 +90,7 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory { public <B> B getService(Class<B> businessInterface, String serviceName) { try { - return (B)node.getClass().getMethod("getService", Class.class, String.class).invoke(node, - businessInterface, - serviceName); + return (B)node.getClass().getMethod("getService", Class.class, String.class).invoke(node, businessInterface, serviceName); } catch (Throwable e) { handleException(e); return null; @@ -101,8 +99,7 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory { public <B> ServiceReference<B> getServiceReference(Class<B> businessInterface, String serviceName) { try { - return (ServiceReference<B>)node.getClass().getMethod("getServiceReference", Class.class, String.class) - .invoke(node, businessInterface, serviceName); + return (ServiceReference<B>)node.getClass().getMethod("getServiceReference", Class.class, String.class).invoke(node, businessInterface, serviceName); } catch (Throwable e) { handleException(e); return null; @@ -354,17 +351,6 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory { return createNode(configuration); } - private NodeConfiguration createConfiguration(Contribution... contributions) { - NodeConfigurationFactory factory = this; - NodeConfiguration configuration = factory.createNodeConfiguration(); - if (contributions != null) { - for (Contribution c : contributions) { - configuration.addContribution(c.getURI(), c.getLocation()); - } - } - return configuration; - } - /** * Creates a new SCA node using defaults for the contribution location and deployable composites. * By default, it uses the Thread context classloader to find META-INF/sca-contribution.xml or @@ -383,6 +369,17 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory { Contribution[] contributions = getContributions(locations); return createNode(contributions); } + + private NodeConfiguration createConfiguration(Contribution... contributions) { + NodeConfigurationFactory factory = this; + NodeConfiguration configuration = factory.createNodeConfiguration(); + if (contributions != null) { + for (Contribution c : contributions) { + configuration.addContribution(c.getURI(), c.getLocation()); + } + } + return configuration; + } private Contribution[] getContributions(List<String> locations) { Contribution[] contributions = new Contribution[locations.size()]; |