IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
ConstructorInfo.cs
Go to the documentation of this file.
1/*
2 Copyright (C) 2009-2012 Jeroen Frijters
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19
20 Jeroen Frijters
21 jeroen@frijters.net
22
23*/
24using System.Collections.Generic;
25
26namespace IKVM.Reflection
27{
28
29 internal abstract class ConstructorInfo : MethodBase
30 {
31
32 public static readonly string ConstructorName = ".ctor";
33 public static readonly string TypeConstructorName = ".cctor";
34
38 internal ConstructorInfo()
39 {
40
41 }
42
43 public sealed override string ToString()
44 {
45 return GetMethodInfo().ToString();
46 }
47
48 internal abstract MethodInfo GetMethodInfo();
49
50 internal override MethodBase BindTypeParameters(Type type)
51 {
52 return new ConstructorInfoImpl((MethodInfo)GetMethodInfo().BindTypeParameters(type));
53 }
54
55 public sealed override MethodBase __GetMethodOnTypeDefinition()
56 {
57 return new ConstructorInfoImpl((MethodInfo)GetMethodInfo().__GetMethodOnTypeDefinition());
58 }
59
60 public sealed override MemberTypes MemberType
61 {
62 get { return MemberTypes.Constructor; }
63 }
64
65 public sealed override int __MethodRVA
66 {
67 get { return GetMethodInfo().__MethodRVA; }
68 }
69
70 public sealed override bool ContainsGenericParameters
71 {
72 get { return GetMethodInfo().ContainsGenericParameters; }
73 }
74
75 public ParameterInfo __ReturnParameter
76 {
77 get { return new ParameterInfoWrapper(this, GetMethodInfo().ReturnParameter); }
78 }
79
80 public sealed override ParameterInfo[] GetParameters()
81 {
82 var parameters = GetMethodInfo().GetParameters();
83 for (int i = 0; i < parameters.Length; i++)
84 parameters[i] = new ParameterInfoWrapper(this, parameters[i]);
85
86 return parameters;
87 }
88
89 internal override Type[] GetParameterTypes()
90 {
91 return GetMethodInfo().GetParameterTypes();
92 }
93
94 public sealed override CallingConventions CallingConvention
95 {
96 get { return GetMethodInfo().CallingConvention; }
97 }
98
99 public sealed override MethodAttributes Attributes
100 {
101 get { return GetMethodInfo().Attributes; }
102 }
103
104 public sealed override MethodImplAttributes GetMethodImplementationFlags()
105 {
106 return GetMethodInfo().GetMethodImplementationFlags();
107 }
108
109 public sealed override Type DeclaringType
110 {
111 get { return GetMethodInfo().DeclaringType; }
112 }
113
114 public sealed override string Name
115 {
116 get { return GetMethodInfo().Name; }
117 }
118
119 public sealed override int MetadataToken
120 {
121 get { return GetMethodInfo().MetadataToken; }
122 }
123
124 public sealed override Module Module
125 {
126 get { return GetMethodInfo().Module; }
127 }
128
129 public sealed override MethodBody GetMethodBody()
130 {
131 return GetMethodInfo().GetMethodBody();
132 }
133
134 public sealed override bool __IsMissing
135 {
136 get { return GetMethodInfo().__IsMissing; }
137 }
138
139 internal sealed override int ParameterCount
140 {
141 get { return GetMethodInfo().ParameterCount; }
142 }
143
144 internal sealed override MemberInfo SetReflectedType(Type type)
145 {
146 return new ConstructorInfoWithReflectedType(type, this);
147 }
148
149 internal sealed override int GetCurrentToken()
150 {
151 return GetMethodInfo().GetCurrentToken();
152 }
153
154 internal sealed override List<CustomAttributeData> GetPseudoCustomAttributes(Type attributeType)
155 {
156 return GetMethodInfo().GetPseudoCustomAttributes(attributeType);
157 }
158
159 internal sealed override bool IsBaked
160 {
161 get { return GetMethodInfo().IsBaked; }
162 }
163
164 internal sealed override MethodSignature MethodSignature
165 {
166 get { return GetMethodInfo().MethodSignature; }
167 }
168
169 internal sealed override int ImportTo(Emit.ModuleBuilder module)
170 {
171 return GetMethodInfo().ImportTo(module);
172 }
173
174 }
175
176}
IKVM.Reflection.Module Module
IKVM.Reflection.Type Type
IKVM.Reflection.ConstructorInfo ConstructorInfo
IKVM.Reflection.MemberInfo MemberInfo
IKVM.Reflection.MethodInfo MethodInfo
IKVM.Reflection.ParameterInfo ParameterInfo
IKVM.Reflection.MethodBase MethodBase
global::java.lang.invoke.LambdaForm.Name Name
System.Runtime.InteropServices.CallingConvention CallingConvention
Definition Signature.cs:35