Search in sources :

Example 1 with Edge

use of com.github.sevntu.checkstyle.dot.domain.Edge in project methods-distance by sevntu-checkstyle.

the class DependencyInfoGraphSerializer method createEdge.

private static Edge createEdge(Method caller, Method callee, Map<Method, Node> methodToNode, MethodOrder methodOrder) {
    final Node callerNode = methodToNode.get(caller);
    final Node calleeNode = methodToNode.get(callee);
    final Edge edge = new Edge(callerNode, calleeNode);
    final int indexDistance = methodOrder.getMethodsIndexDifference(caller, callee);
    final int lineDistance = methodOrder.getMethodsLineDifference(caller, callee);
    edge.setLabel(getFormattedEdgeLabel(indexDistance, lineDistance));
    return edge;
}
Also used : Node(com.github.sevntu.checkstyle.dot.domain.Node) Edge(com.github.sevntu.checkstyle.dot.domain.Edge)

Aggregations

Edge (com.github.sevntu.checkstyle.dot.domain.Edge)1 Node (com.github.sevntu.checkstyle.dot.domain.Node)1