| |||||||||||||||||
Source File | Conditionals | Statements | Methods | TOTAL | |||||||||||||
Seasar.Framework.Aop\Impl\AbstractAspectWeaver.cs | 100.0% | 100.0% | 100.0% | 100.0% |
|
1 | using System; | |
2 | using Seasar.Framework.Container; | |
3 | ||
4 | namespace Seasar.Framework.Aop.Impl | |
5 | { | |
6 | /// <summary> | |
7 | /// Aspectを織り込む処理を持つ抽象クラス | |
8 | /// </summary> | |
9 | public abstract class AbstractAspectWeaver : IAspectWeaver | |
10 | { | |
11 | /// <summary> | |
12 | /// Aspectを織り込む | |
13 | /// </summary> | |
14 | /// <param name="target">Aspectを織り込む対象のオブジェクト</param> | |
15 | /// <param name="componentDef">Aspectを織り込む対象のコンポーネント定義</param> | |
16 | public abstract void WeaveAspect(ref object target, IComponentDef componentDef); | |
17 | ||
18 | /// <summary> | |
19 | /// コンポーネント定義に設定されているAspectを取得する | |
20 | /// </summary> | |
21 | /// <param name="componentDef">コンポーネント定義</param> | |
22 | /// <returns>Aspectの配列</returns> | |
23 | 43 | protected IAspect[] GetAspects(IComponentDef componentDef) |
24 | { | |
25 | 43 | int size = componentDef.AspectDefSize; |
26 | 43 | IAspect[] aspects = new IAspect[size]; |
27 | 92 | for (int i = 0; i < size; ++i) |
28 | { | |
29 | 49 | aspects[i] = componentDef.GetAspectDef(i).Aspect; |
30 | } | |
31 | 43 | return aspects; |
32 | } | |
33 | ||
34 | } | |
35 | } | |
36 |
|