1
|
|
#region Copyright
|
2
|
|
|
3
|
|
|
4
|
|
|
5
|
|
|
6
|
|
|
7
|
|
|
8
|
|
|
9
|
|
|
10
|
|
|
11
|
|
|
12
|
|
|
13
|
|
|
14
|
|
|
15
|
|
|
16
|
|
|
17
|
|
#endregion
|
18
|
|
|
19
|
|
using System;
|
20
|
|
using System.Reflection;
|
21
|
|
using Seasar.Framework.Util;
|
22
|
|
using Seasar.Framework.Container.Util;
|
23
|
|
|
24
|
|
namespace Seasar.Framework.Container.Assembler
|
25
|
|
{
|
26
|
|
|
27
|
|
|
28
|
|
|
29
|
|
public abstract class AbstractConstructorAssembler : AbstractAssembler,
|
30
|
|
IConstructorAssembler
|
31
|
|
{
|
32
|
482
|
public AbstractConstructorAssembler(IComponentDef componentDef)
|
33
|
|
: base(componentDef)
|
34
|
|
{
|
35
|
|
}
|
36
|
|
|
37
|
319
|
protected object AssembleDefault()
|
38
|
|
{
|
39
|
319
|
Type type = this.ComponentDef.ComponentType;
|
40
|
319
|
ConstructorInfo constructor = ClassUtil.GetConstructorInfo(type,null);
|
41
|
318
|
object obj = ConstructorUtil.NewInstance(constructor,null);
|
42
|
318
|
if (this.ComponentDef.AspectDefSize > 0)
|
43
|
|
{
|
44
|
30
|
AopProxyUtil.WeaveAspect(ref obj, this.ComponentDef);
|
45
|
|
}
|
46
|
318
|
return obj;
|
47
|
|
}
|
48
|
|
|
49
|
|
#region ConstructorAssembler メンバ
|
50
|
|
|
51
|
0
|
public virtual object Assemble()
|
52
|
|
{
|
53
|
|
|
54
|
|
return null;
|
55
|
|
}
|
56
|
|
|
57
|
|
#endregion
|
58
|
|
}
|
59
|
|
}
|
60
|
|
|