Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ArC Dev UI - add bean dependency graph
- also add DEBUG logging for unremovable beans - resolves #26065
- Loading branch information
Showing
13 changed files
with
471 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
...ons/arc/deployment/src/main/java/io/quarkus/arc/deployment/devconsole/DependecyGraph.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package io.quarkus.arc.deployment.devconsole; | ||
|
||
import java.util.Objects; | ||
import java.util.Set; | ||
|
||
public class DependecyGraph { | ||
|
||
public final Set<DevBeanInfo> nodes; | ||
public final Set<Link> links; | ||
|
||
public DependecyGraph(Set<DevBeanInfo> nodes, Set<Link> links) { | ||
this.nodes = nodes; | ||
this.links = links; | ||
} | ||
|
||
public static class Link { | ||
|
||
static Link dependent(boolean direct, String source, String target) { | ||
return new Link(source, target, direct ? "directDependent" : "dependency"); | ||
} | ||
|
||
static Link dependency(boolean direct, String source, String target) { | ||
return new Link(source, target, direct ? "directDependency" : "dependency"); | ||
} | ||
|
||
static Link lookup(String source, String target) { | ||
return new Link(source, target, "lookup"); | ||
} | ||
|
||
static Link producer(String source, String target) { | ||
return new Link(source, target, "producer"); | ||
} | ||
|
||
public final String source; | ||
public final String target; | ||
public final String type; | ||
|
||
public Link(String source, String target, String type) { | ||
this.source = source; | ||
this.target = target; | ||
this.type = type; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(source, target); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) { | ||
return true; | ||
} | ||
if (obj == null) { | ||
return false; | ||
} | ||
if (getClass() != obj.getClass()) { | ||
return false; | ||
} | ||
Link other = (Link) obj; | ||
return Objects.equals(source, other.source) && Objects.equals(target, other.target); | ||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.