<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>iad_otomamay</author_name>
  <author_url>https://blog.hatena.ne.jp/iad_otomamay/</author_url>
  <blog_title>レベルエンター山本大のブログ</blog_title>
  <blog_url>https://daiyamamoto.hatenablog.com/</blog_url>
  <categories>
    <anon>Java</anon>
    <anon>Mixin</anon>
  </categories>
  <description>Rubyで利用できるMixinは、いわば多重継承の仕組みです。CGLIBを使うことで、Javaでも疑似Mixinが使えます。ただしインターフェイスベースでのMixinです。 以下のサンプルは、HumanオブジェクトとEmployeeオブジェクトを合成して両方のメソッドを持った新しいオブジェクトを作成しています。合成後のオブジェクトには、元オブジェクトのインターフェイスを介してアクセスできます。 Humanクラスには、Talkerインターフェイスが、Employeeクラスには、Workerインターフェイスが、それぞれ実装されていて、結果のオブジェクトが両方のインターフェイスでキャストしてメソッド…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdaiyamamoto.hatenablog.com%2Fentry%2F20080512%2Fp1&quot; title=&quot;Java with CGLIB でMixinを使う - レベルエンター山本大のブログ&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>2008-05-12 00:00:00</published>
  <title>Java with CGLIB でMixinを使う</title>
  <type>rich</type>
  <url>https://daiyamamoto.hatenablog.com/entry/20080512/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
