<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>drillkoubou</author_name>
  <author_url>https://blog.hatena.ne.jp/drillkoubou/</author_url>
  <blog_title>ソフトウェア設計の原理(の下書き)</blog_title>
  <blog_url>https://drillkoubou.hatenadiary.org/</blog_url>
  <categories>
  </categories>
  <description>class Aがclass BのメソッドMに依存しているとします。AからBへの依存関係を切断する一般的手法をコードで示します。 状況はこのように表せます。 class A { public void Hoge() { ... new B().M(); ... } } class B { public void M(){...} } 引数がなく戻り値がない関数型を{ void =&gt; void }のように表すことにします。int, stringを引数に取りdoubleを返す関数型なら{ int, string =&gt; double }です。 AからBへの依存性を切断するとこうなります。 class …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdrillkoubou.hatenadiary.org%2Fentry%2F20110727%2Fp1&quot; title=&quot;依存性の切断の一般的手法 - ソフトウェア設計の原理(の下書き)&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2011-07-27 00:00:00</published>
  <title>依存性の切断の一般的手法</title>
  <type>rich</type>
  <url>https://drillkoubou.hatenadiary.org/entry/20110727/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
