<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>s-ishigami</author_name>
  <author_url>https://blog.hatena.ne.jp/s-ishigami/</author_url>
  <blog_title>susumuis Info</blog_title>
  <blog_url>https://susumuis.hateblo.jp/</blog_url>
  <categories>
    <anon>java</anon>
  </categories>
  <description>コンストラクタを呼ばないでインスタンスを生成してリフレクションで横から強制的に初期化という行為が必要だった。sun.misc.UnsafeというAPIを使用するとできるらしいのでやってみた。あっけなく出来てしまった。まずは今回テストしたコードを下記に貼り付けます。 実行すると延々と、&quot;hello, hoge&quot;と出力されます。 このクラスはコンストラクタを呼ぶと例外を飛ばす酷いやつですが、ちゃんとインスタンス化できていることがわかります。 コードUnsafeインスタンスの取得がリフレクション経由になっていますが、どうやら、この取り方が自分が調べた限り主流のようです。 理由は Unsafeオブジェ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsusumuis.hateblo.jp%2Fentry%2F2014%2F03%2F31%2F103829&quot; title=&quot; sun.misc.Unsafeを使う - susumuis Info&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>http://cdn-ak.f.st-hatena.com/images/fotolife/s/s-ishigami/20140331/20140331102547.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2014-03-31 10:38:29</published>
  <title> sun.misc.Unsafeを使う</title>
  <type>rich</type>
  <url>https://susumuis.hateblo.jp/entry/2014/03/31/103829</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
