Skip to content
Snippets Groups Projects
Commit a3302e19 authored by Christian Wulf's avatar Christian Wulf
Browse files

minor refactorings

parent d1b7f47a
Branches
Tags
No related merge requests found
......@@ -19,47 +19,43 @@ import teetime.framework.pipe.IPipe;
public abstract class AbstractPort<T> {
private final String portName;
protected IPipe pipe;
/**
* The type of this port.
* <p>
* <i>Used to validate the connection between two ports at runtime.</i>
* </p>
*/
protected final Class<T> type;
private final Class<T> type;
private final Stage owningStage;
private final String name;
public AbstractPort(final Class<T> type, final Stage owningStage, final String portName) {
protected IPipe pipe;
public AbstractPort(final Class<T> type, final Stage owningStage, final String name) {
super();
this.portName = portName;
this.type = type;
this.owningStage = owningStage;
this.name = (name != null) ? name : super.toString();
}
public IPipe getPipe() {
return this.pipe;
public Class<T> getType() {
return this.type;
}
public void setPipe(final IPipe pipe) {
this.pipe = pipe;
public Stage getOwningStage() {
return owningStage;
}
public Class<T> getType() {
return this.type;
public IPipe getPipe() {
return this.pipe;
}
public final Stage getOwningStage() {
return owningStage;
public void setPipe(final IPipe pipe) {
this.pipe = pipe;
}
@Override
public final String toString() {
if (portName == null) {
return super.toString();
} else {
return portName;
}
public String toString() {
return name;
}
}
wiki @ 709c839c
Subproject commit 709c839c447a50c93b37fcc633a01297115d4823
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment