class ConnectionAcceptorControlImpl extends AbstractAcceptorControl implements ConnectionAcceptorControl<AbstractCanvasHandler> {

    public static Connection createConnection(final WiresConnection wiresConnection,
                                              final WiresMagnet wiresMagnet) {
        if (null == wiresMagnet && null == wiresConnection) {
            return null;
        }
        if (null == wiresMagnet) {
            return Point2DConnection.at(Point2D.create(wiresConnection.getPoint().getX(),
                                                       wiresConnection.getPoint().getY()));
        }
        return new MagnetConnection.Builder()
                .atX(wiresMagnet.getX())
                .atY(wiresMagnet.getY())
                .auto(null != wiresConnection && wiresConnection.isAutoConnection())
                .magnet(wiresMagnet.getIndex())
                .build();
    }

    @Inject public  ConnectionAcceptorControlImpl(final CanvasCommandFactory<AbstractCanvasHandler> canvasCommandFactory,
                                         final CanvasHighlight canvasHighlight);

}