class PropertyReaderUtils {

    public static Point2D getTargetPosition(DefinitionResolver definitionResolver,
                                            String edgeId,
                                            String targetId) {
        final double resolutionFactor = definitionResolver.getResolutionFactor();
        final Bounds targetBounds = definitionResolver.getShape(targetId).getBounds();
        final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint();

        return waypoint.isEmpty() ?
                targetPosition(targetBounds, resolutionFactor)
                : offsetPosition(targetBounds,
                                 waypoint.get(waypoint.size() - 1),
                                 resolutionFactor);
    }

}