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.Runtime.Serialization;
|
21
|
|
using Seasar.Framework.Exceptions;
|
22
|
|
using Seasar.Framework.Util;
|
23
|
|
|
24
|
|
namespace Seasar.Framework.Beans
|
25
|
|
{
|
26
|
|
|
27
|
|
|
28
|
|
|
29
|
|
[Serializable]
|
30
|
|
public class MethodNotFoundRuntimeException : SRuntimeException
|
31
|
|
{
|
32
|
|
private Type targetType_;
|
33
|
|
private string methodName_;
|
34
|
|
private Type[] methodArgTypes_;
|
35
|
|
|
36
|
3
|
public MethodNotFoundRuntimeException(
|
37
|
|
Type targetType,string methodName,object[] methodArgs)
|
38
|
|
: base("ESSR0049",new object[] {
|
39
|
|
targetType.FullName,
|
40
|
|
MethodUtil.GetSignature(methodName,methodArgs) } )
|
41
|
|
{
|
42
|
3
|
targetType_ = targetType;
|
43
|
3
|
methodName_ = methodName;
|
44
|
3
|
if(methodArgs != null) methodArgTypes_ = Type.GetTypeArray(methodArgs);
|
45
|
|
}
|
46
|
|
|
47
|
0
|
public MethodNotFoundRuntimeException(
|
48
|
|
Type targetType,string methodName,Type[] methodArgTypes)
|
49
|
|
: base("ESSR0049",new object[] {
|
50
|
|
targetType.FullName,
|
51
|
|
MethodUtil.GetSignature(methodName,methodArgTypes)})
|
52
|
|
{
|
53
|
|
targetType_ = targetType;
|
54
|
|
methodName_ = methodName;
|
55
|
|
methodArgTypes_ = methodArgTypes;
|
56
|
|
}
|
57
|
|
|
58
|
0
|
public MethodNotFoundRuntimeException(SerializationInfo info, StreamingContext context)
|
59
|
|
: base( info, context )
|
60
|
|
{
|
61
|
|
this.targetType_ = info.GetValue("targetType_", typeof(Type)) as Type;
|
62
|
|
this.methodName_ = info.GetString("methodName_");
|
63
|
|
this.methodArgTypes_ = info.GetValue("methodArgTypes_", typeof(Type[])) as Type[];
|
64
|
|
|
65
|
|
}
|
66
|
|
|
67
|
0
|
public override void GetObjectData( SerializationInfo info,
|
68
|
|
StreamingContext context )
|
69
|
|
{
|
70
|
|
info.AddValue("targetType_", this.targetType_, typeof(Type));
|
71
|
|
info.AddValue("methodName_", this.methodName_, typeof(String));
|
72
|
|
info.AddValue("methodArgTypes_", this.methodArgTypes_, typeof(Type[]));
|
73
|
|
|
74
|
|
base.GetObjectData(info, context);
|
75
|
|
}
|
76
|
|
|
77
|
0
|
public Type TargetType
|
78
|
|
{
|
79
|
|
get { return targetType_; }
|
80
|
|
}
|
81
|
|
|
82
|
0
|
public string MethodName
|
83
|
|
{
|
84
|
|
get { return methodName_; }
|
85
|
|
}
|
86
|
|
|
87
|
0
|
public Type[] MethodArgTypes
|
88
|
|
{
|
89
|
|
get { return methodArgTypes_; }
|
90
|
|
}
|
91
|
|
}
|
92
|
|
}
|
93
|
|
|