<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>unageanu</author_name>
  <author_url>https://blog.hatena.ne.jp/unageanu/</author_url>
  <blog_title>うなの日記</blog_title>
  <blog_url>https://unageanu.hatenablog.com/</blog_url>
  <categories>
    <anon>Java</anon>
  </categories>
  <description>次のようなクラスがあって、 class Foo&lt;X&gt; { Foo( Class&lt;X&gt; cl ) {} } 任意のクラスを引数として、境界ワイルドカードを型パラメータとするFooを作成したい場合、以下のように書くとコンパイルエラーになります。 Class&lt;?&gt; cl = null; Foo&lt;?&gt; foo = new Foo&lt;?&gt;( cl ); // コンパイルエラー こういう場合は、以下のようなユーティリティ関数を用意するとうまくかけます。 static &lt;X&gt; Foo&lt;X&gt; foo( Class&lt;X&gt; cl ) { return new Foo&lt;X&gt;( cl ); } ユーティリティを使って …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Funageanu.hatenablog.com%2Fentry%2F20081101%2F1225534242&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>2008-11-01 19:10:42</published>
  <title> 境界ワイルドカードを型パラメータとするインスタンスを作る。</title>
  <type>rich</type>
  <url>https://unageanu.hatenablog.com/entry/20081101/1225534242</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
