tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmar...@apache.org
Subject svn commit: r439235 - in /incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core: builder/ implementation/processor/ implementation/system/builder/ implementation/system/wire/
Date Fri, 01 Sep 2006 08:35:08 GMT
Author: jmarino
Date: Fri Sep  1 01:35:07 2006
New Revision: 439235

URL: http://svn.apache.org/viewvc?rev=439235&view=rev
Log:
checkstyle cleanup

Modified:
    incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/builder/ConnectorImpl.java
    incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ReferenceProcessor.java
    incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/system/builder/SystemComponentBuilder.java
    incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/system/wire/SystemOutboundAutowire.java

Modified: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/builder/ConnectorImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/builder/ConnectorImpl.java?rev=439235&r1=439234&r2=439235&view=diff
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/builder/ConnectorImpl.java
(original)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/builder/ConnectorImpl.java
Fri Sep  1 01:35:07 2006
@@ -103,16 +103,16 @@
                 chain.prepare();
             }
         } else if (source instanceof Service) {
-            Service<?> service = (Service) source;
-            InboundWire inboundWire = service.getInboundWire();
-            OutboundWire outboundWire = service.getOutboundWire();
-            // connect the outbound service wire to the target    xcv
+            Service<T> service = (Service<T>) source;
+            InboundWire<T> inboundWire = service.getInboundWire();
+            OutboundWire<T> outboundWire = service.getOutboundWire();
+            // connect the outbound service wire to the target
             connect(service, outboundWire);
             // services have inbound and outbound wires
             // NB: this connect must be done after the outbound service chain is connected
to its target above
             connect(inboundWire, outboundWire, true);
         } else {
-            BuilderConfigException e = new BuilderConfigException("Invalid source context
type");
+            BuilderConfigException e = new BuilderConfigException("Invalid source type");
             e.setIdentifier(source.getName());
             e.addContextName(parent.getName());
             throw e;
@@ -287,7 +287,7 @@
      * @throws BuilderConfigException
      */
     @SuppressWarnings("unchecked")
-    private <T> void connect(SCAObject<?> source,
+    private <T> void connect(SCAObject<T> source,
                              OutboundWire<T> sourceWire) throws BuilderConfigException
{
         assert sourceWire.getTargetName() != null : "Wire target name was null";
         QualifiedName targetName = sourceWire.getTargetName();

Modified: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ReferenceProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ReferenceProcessor.java?rev=439235&r1=439234&r2=439235&view=diff
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ReferenceProcessor.java
(original)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ReferenceProcessor.java
Fri Sep  1 01:35:07 2006
@@ -59,7 +59,7 @@
         throws ProcessingException {
         Reference annotation = method.getAnnotation(Reference.class);
         Autowire autowire = method.getAnnotation(Autowire.class);
-        boolean isAutowire= autowire != null;
+        boolean isAutowire = autowire != null;
         if (annotation == null && !isAutowire) {
             return; //Not a reference or autowire annotation.
         }
@@ -70,12 +70,12 @@
         }
         //process autowire required first let reference override. or if conflicting should
this fault?
         boolean required = false;
-        if(isAutowire) {
-            required= autowire.required();
+        if (isAutowire) {
+            required = autowire.required();
         }
-        
+
         String name = null;
-        
+
         if (annotation != null) {
             if (annotation.name() != null && annotation.name().length() > 0) {
                 name = annotation.name();
@@ -91,7 +91,7 @@
         if (type.getReferences().get(name) != null) {
             throw new DuplicateReferenceException(name);
         }
-       
+
         JavaMappedReference reference = new JavaMappedReference();
         reference.setMember(method);
         reference.setAutowire(isAutowire);

Modified: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/system/builder/SystemComponentBuilder.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/system/builder/SystemComponentBuilder.java?rev=439235&r1=439234&r2=439235&view=diff
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/system/builder/SystemComponentBuilder.java
(original)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/system/builder/SystemComponentBuilder.java
Fri Sep  1 01:35:07 2006
@@ -25,12 +25,15 @@
 
 import org.apache.tuscany.spi.ObjectFactory;
 import org.apache.tuscany.spi.QualifiedName;
-import org.apache.tuscany.spi.implementation.java.JavaMappedProperty;
 import org.apache.tuscany.spi.builder.BuilderConfigException;
 import org.apache.tuscany.spi.component.AtomicComponent;
 import org.apache.tuscany.spi.component.CompositeComponent;
 import org.apache.tuscany.spi.deployer.DeploymentContext;
 import org.apache.tuscany.spi.extension.ComponentBuilderExtension;
+import org.apache.tuscany.spi.implementation.java.ConstructorDefinition;
+import org.apache.tuscany.spi.implementation.java.JavaMappedProperty;
+import org.apache.tuscany.spi.implementation.java.JavaMappedReference;
+import org.apache.tuscany.spi.implementation.java.PojoComponentType;
 import org.apache.tuscany.spi.model.ComponentDefinition;
 import org.apache.tuscany.spi.model.PropertyValue;
 import org.apache.tuscany.spi.model.ReferenceDefinition;
@@ -39,11 +42,6 @@
 import org.apache.tuscany.spi.wire.OutboundWire;
 
 import org.apache.tuscany.core.component.AutowireComponent;
-import org.apache.tuscany.spi.implementation.java.ConstructorDefinition;
-
-import org.apache.tuscany.spi.implementation.java.JavaMappedReference;
-import org.apache.tuscany.spi.implementation.java.PojoComponentType;
-
 import org.apache.tuscany.core.implementation.PojoConfiguration;
 import org.apache.tuscany.core.implementation.system.component.SystemAtomicComponentImpl;
 import org.apache.tuscany.core.implementation.system.model.SystemImplementation;
@@ -128,7 +126,7 @@
         // handle inbound wires
         for (ServiceDefinition serviceDefinition : componentType.getServices().values())
{
             Class interfaze = serviceDefinition.getServiceContract().getInterfaceClass();
-            SystemInboundWire<?> wire =  new SystemInboundWireImpl(serviceDefinition.getName(),
interfaze, component);
+            SystemInboundWire<?> wire = new SystemInboundWireImpl(serviceDefinition.getName(),
interfaze, component);
             component.addInboundWire(wire);
         }
         // handle references directly with no proxies
@@ -138,7 +136,8 @@
             Class interfaze = referenceDefiniton.getServiceContract().getInterfaceClass();
             OutboundWire<?> wire;
             if (referenceDefiniton.isAutowire()) {
-                wire = new SystemOutboundAutowire(referenceName, interfaze, autowireContext,
referenceDefiniton.isRequired());
+                wire = new SystemOutboundAutowire(referenceName, interfaze, autowireContext,
+                    referenceDefiniton.isRequired());     
             } else {
                 //FIXME support multiplicity!
                 assert target.getTargets().size() == 1 : "Multiplicity not yet implemented";
@@ -151,7 +150,8 @@
         for (ReferenceDefinition reference : componentType.getReferences().values()) {
             if (reference.isAutowire()) {
                 Class interfaze = reference.getServiceContract().getInterfaceClass();
-                OutboundWire<?> wire = new SystemOutboundAutowire(reference.getName(),
interfaze, autowireContext, reference.isRequired());
+                OutboundWire<?> wire =
+                    new SystemOutboundAutowire(reference.getName(), interfaze, autowireContext,
reference.isRequired());
                 component.addOutboundWire(wire);
             }
         }

Modified: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/system/wire/SystemOutboundAutowire.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/system/wire/SystemOutboundAutowire.java?rev=439235&r1=439234&r2=439235&view=diff
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/system/wire/SystemOutboundAutowire.java
(original)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/system/wire/SystemOutboundAutowire.java
Fri Sep  1 01:35:07 2006
@@ -43,15 +43,15 @@
     private String referenceName;
     private ServiceContract serviceContract;
     private AutowireComponent<?> component;
-    final private boolean required;
+    private final boolean required;
 
     public SystemOutboundAutowire(String referenceName, Class<T> businessInterface,
AutowireComponent<?> component,
-            boolean required) {
-        
+                                  boolean required) {
+
         this.referenceName = referenceName;
         this.component = component;
         serviceContract = new JavaServiceContract(businessInterface);
-        this.required= required;
+        this.required = required;
     }
 
     public ServiceContract getServiceContract() {



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message