git://wamblee.org
/
utils
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(no commit message)
[utils]
/
system
/
general
/
src
/
main
/
java
/
org
/
wamblee
/
system
/
graph
/
component
/
ComponentGraph.java
diff --git
a/system/general/src/main/java/org/wamblee/system/graph/component/ComponentGraph.java
b/system/general/src/main/java/org/wamblee/system/graph/component/ComponentGraph.java
index aedaa0c3e94021a33c86cc7bdaf14bcc47e48a75..b41c41c81445d277165fed2eb7f44414b224d944 100644
(file)
--- a/
system/general/src/main/java/org/wamblee/system/graph/component/ComponentGraph.java
+++ b/
system/general/src/main/java/org/wamblee/system/graph/component/ComponentGraph.java
@@
-36,12
+36,14
@@
import org.wamblee.system.graph.Node;
*/
public class ComponentGraph extends Graph {
*/
public class ComponentGraph extends Graph {
+ private boolean _isLinked;
private CompositeEdgeFilter _edgeFilter;
/**
* Constructs an empty component graph.
*/
public ComponentGraph() {
private CompositeEdgeFilter _edgeFilter;
/**
* Constructs an empty component graph.
*/
public ComponentGraph() {
+ _isLinked = false;
_edgeFilter = new CompositeEdgeFilter();
}
_edgeFilter = new CompositeEdgeFilter();
}
@@
-82,8
+84,12
@@
public class ComponentGraph extends Graph {
* Links provided and required interfaces together in the component
* model based on the graph model.
*/
* Links provided and required interfaces together in the component
* model based on the graph model.
*/
- public void link() {
+ public void link() {
+ if ( _isLinked ) {
+ return;
+ }
accept(new LinkVisitor());
accept(new LinkVisitor());
+ _isLinked = true;
}
/**
}
/**
@@
-111,7
+117,7
@@
public class ComponentGraph extends Graph {
* provided interfaces.
* @param aComponent Component to add.
*/
* provided interfaces.
* @param aComponent Component to add.
*/
- public void addComponent(Component aComponent) {
+ public void addComponent(Component
<?>
aComponent) {
// Add required interfaces.
Node compNode = new ComponentNode(aComponent);
List<Node> requiredNodes = new ArrayList<Node>();
// Add required interfaces.
Node compNode = new ComponentNode(aComponent);
List<Node> requiredNodes = new ArrayList<Node>();