diff options
Diffstat (limited to 'java/sca/modules/assembly/src')
6 files changed, 28 insertions, 4 deletions
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/BindingImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/BindingImpl.java index 40ffb6a4b5..552d67fec6 100644 --- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/BindingImpl.java +++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/BindingImpl.java @@ -86,5 +86,14 @@ public abstract class BindingImpl extends ExtensibleImpl implements Binding { public void setURI(String uri) { this.uri = uri; } + + public String toString() { + StringBuffer buf = new StringBuffer(); + buf.append(getType()).append(" ("); + buf.append("uri=").append(getURI()); + buf.append(",name=").append(getName()); + buf.append(")"); + return buf.toString(); + } } diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentImpl.java index d819fb6aa2..34841196a3 100644 --- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentImpl.java +++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentImpl.java @@ -187,5 +187,14 @@ public class ComponentImpl extends ExtensibleImpl implements Component, Cloneabl public void setExtensionType(ExtensionType type) { this.type = type; } + + public String toString() { + StringBuffer buf = new StringBuffer("Component ("); + buf.append("uri=").append(uri); + buf.append(",name=").append(name); + buf.append(",implementation=").append(implementation); + buf.append(")"); + return buf.toString(); + } } diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeImpl.java index 389f163a95..e93d5ebc25 100644 --- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeImpl.java +++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeImpl.java @@ -174,6 +174,6 @@ public class CompositeImpl extends ImplementationImpl implements Composite, Clon @Override public String toString() { - return (this.name != null) ? getName().toString() : "null"; + return "Composite (name=" + getName() + ")"; } } diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ImplementationImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ImplementationImpl.java index 2be96b9792..baa23450ab 100644 --- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ImplementationImpl.java +++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ImplementationImpl.java @@ -50,4 +50,8 @@ public abstract class ImplementationImpl extends ComponentTypeImpl implements Im public QName getType() { return type; } + + public String toString() { + return String.valueOf(getType()); + } } diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/definitions/Definitions.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/definitions/Definitions.java index 979ff7c187..7a63bbedc5 100644 --- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/definitions/Definitions.java +++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/definitions/Definitions.java @@ -20,6 +20,7 @@ package org.apache.tuscany.sca.definitions; import java.util.List; +import org.apache.tuscany.sca.assembly.Binding; import org.apache.tuscany.sca.policy.BindingType; import org.apache.tuscany.sca.policy.ImplementationType; import org.apache.tuscany.sca.policy.Intent; @@ -79,5 +80,5 @@ public interface Definitions { * * @return a list of domain wide binding definition objects */ - List<Object> getBindings(); + List<Binding> getBindings(); } diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/definitions/impl/DefinitionsImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/definitions/impl/DefinitionsImpl.java index 1987b39abe..224bc0a69a 100644 --- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/definitions/impl/DefinitionsImpl.java +++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/definitions/impl/DefinitionsImpl.java @@ -22,6 +22,7 @@ package org.apache.tuscany.sca.definitions.impl; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; +import org.apache.tuscany.sca.assembly.Binding; import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.policy.BindingType; import org.apache.tuscany.sca.policy.ImplementationType; @@ -39,7 +40,7 @@ public class DefinitionsImpl implements Definitions { private List<PolicySet> policySets = new CopyOnWriteArrayList<PolicySet>(); private List<BindingType> bindingTypes = new CopyOnWriteArrayList<BindingType>(); private List<ImplementationType> implementationTypes = new CopyOnWriteArrayList<ImplementationType>(); - private List<Object> bindings = new CopyOnWriteArrayList<Object>(); + private List<Binding> bindings = new CopyOnWriteArrayList<Binding>(); public List<BindingType> getBindingTypes() { @@ -66,7 +67,7 @@ public class DefinitionsImpl implements Definitions { this.targetNamespace = ns; } - public List<Object> getBindings() { + public List<Binding> getBindings() { return bindings; } } |