|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 必須 | オプション | 詳細: 要素 |
@Target(value=TYPE) @Retention(value=RUNTIME) public @interface AnnotateWith
Dao
が注釈されたインタフェースの実装クラスのソースコードにアノテーションを付与することを示します。
このアノテーションは次の場合にのみ有効です。
Dao
と併用されている。
Dao
の config
要素に ConfigAdapter
が指定されている。
@Dao(config = ConfigAdapter.class) @AnnotateWith(annotations = { @Annotation(target = AnnotationTarget.CONSTRUCOTR, type = Inject.class), @Annotation(target = AnnotationTarget.CONSTRUCOTR_PARAMETER, type = Named.class, elements = "\"sales\"") }) public interface EmployeeDao { ... }実装クラスは次のようになります。
public class EmployeeDaoImpl extends org.seasar.doma.jdbc.DomaAbstractDao implements example.EmployeeDao { @com.google.inject.Inject() public EmployeeDaoImpl(@com.google.inject.name.Named("sales") org.seasar.doma.jdbc.Config config) { super(new org.seasar.doma.jdbc.ConfigAdapter(config)); } ... }
必須要素の概要 | |
---|---|
Annotation[] |
annotations
アノテーション |
要素の詳細 |
---|
public abstract Annotation[] annotations
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 必須 | オプション | 詳細: 要素 |