タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

google-guiceに関するcivicpgのブックマーク (2)

  • google-guice - Google Code

    Put simply, Guice alleviates the need for factories and the use of new in your Java code. Think of Guice's @Inject as the new new. You will still need to write factories in some cases, but your code will not depend directly on them. Your code will be easier to change, unit test and reuse in other contexts. Guice embraces Java's type safe nature. You might think of Guice as filling in missing featu

    google-guice - Google Code
  • 第1回[後編] Guice 1.0 - GoogleからリリースされたDIフレームワーク | gihyo.jp

    前編では、Guiceの概要と導入、そしてGuiceによるDIの設定からインスタンスの生成と実行までの一連の流れについて解説しました。後編ではDIの設定における応用テクニックについて解説します。 応用編 応用編では、DIの設定について3つの方法を紹介します。そして最後にサーブレット(Webアプリケーション)で利用する方法を紹介します。 DIの設定 方法その1-依存性をアノテーションで指定する GuiceによるDIの設定は、前編で紹介したもの以外にもいくつかの方法が用意されています。ここでは、注入する具象クラスをアノテーションで指定する方法を紹介します。これにより、ソースコードの記述をよりシンプルにすることができます。 具体的には、インターフェースに対応する注入される具象クラスを、アノテーション@ImplementedByで指定します(リスト5)。これでモジュールの作成が不要になると共に、In

    第1回[後編] Guice 1.0 - GoogleからリリースされたDIフレームワーク | gihyo.jp
  • 1