Skip to content
Snippets Groups Projects
Commit 0f43aa37 authored by Simon Barner's avatar Simon Barner
Browse files

YELLOW

(Removed erroneous and unused method BaseModelElementUtils.getSuccessorConnector())
refs 2490
parent 68fadfab
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,6 @@ import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import org.fortiss.tooling.base.model.element.IConnection;
import org.fortiss.tooling.base.model.element.IConnector;
import org.fortiss.tooling.base.model.element.IHiddenSpecification;
import org.fortiss.tooling.base.model.element.IHierarchicElement;
......@@ -41,7 +40,7 @@ import org.fortiss.tooling.base.model.element.IModelElementSpecification;
* @author hoelzl
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating RED Hash: 6F5382879B9A2C34F8785319431DB5A0
* @ConQAT.Rating YELLOW Hash: 46F473DE149533261065AC7FC7292ED5
*/
public class BaseModelElementUtils {
......@@ -123,36 +122,6 @@ public class BaseModelElementUtils {
return result;
}
/**
* For a given {@link IConnector}, returns the successor {@link IConnector} of a given
* {@code successorType}.
*
* @param connector
* {@link IConnector} for which to determine the successor.
* @param successorType
* Type of successor {@link IConnector}.
* @return The successor {@link IConnector} in case it exists and is unique (i.e., the given
* {@link IConnector} contains exactly one {@link IConnection} that points to a
* successor {@link IConnector} of the desired type.
*/
// TODO(VA) This method always returns null (!)
// It is however not used anywhere so I think it can be removed.
@SuppressWarnings("unchecked")
public static <T extends IConnector> T getSuccessorConnector(IConnector connector,
Class<T> successorType) {
T rval = null;
for(IConnection connection : connector.getOutgoing()) {
if(successorType.isAssignableFrom(connection.getTarget().getClass())) {
if(rval == null) {
rval = (T)connection.getTarget();
} else {
return null;
}
}
}
return null;
}
/**
* Returns the <i>directly</i> connected {@link IHierarchicElement}s of the given
* {@code element} which have the given type.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment