IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
IKVM.Reflection.Reader.MethodDefImpl Class Referencesealed

Public Member Functions

override MethodBody GetMethodBody ()
 
override MethodImplAttributes GetMethodImplementationFlags ()
 
override ParameterInfo[] GetParameters ()
 
override Type[] GetGenericArguments ()
 
override MethodInfo GetGenericMethodDefinition ()
 
override MethodInfo MakeGenericMethod (params Type[] typeArguments)
 
override MethodInfo[] __GetMethodImpls ()
 

Properties

override int __MethodRVA [get]
 
override CallingConventions CallingConvention [get]
 
override MethodAttributes Attributes [get]
 
override ParameterInfo ReturnParameter [get]
 
override Type ReturnType [get]
 
override Type DeclaringType [get]
 
override string Name [get]
 
override int MetadataToken [get]
 
override bool IsGenericMethodDefinition [get]
 
override bool IsGenericMethod [get]
 
override Module Module [get]
 

Detailed Description

Definition at line 32 of file MethodDefImpl.cs.

Member Function Documentation

◆ __GetMethodImpls()

override MethodInfo[] IKVM.Reflection.Reader.MethodDefImpl.__GetMethodImpls ( )

Definition at line 248 of file MethodDefImpl.cs.

249 {
250 Type[] typeArgs = null;
251 List<MethodInfo> list = null;
252
253 foreach (var i in module.MethodImplTable.Filter(declaringType.MetadataToken))
254 {
255 if (module.MethodImplTable.records[i].MethodBody == this.MetadataToken)
256 {
257 typeArgs ??= declaringType.GetGenericArguments();
258 list ??= new List<MethodInfo>();
259 list.Add((MethodInfo)module.ResolveMethod(module.MethodImplTable.records[i].MethodDeclaration, typeArgs, null));
260 }
261 }
262
263 return Util.ToArray(list, Array.Empty<MethodInfo>());
264 }
IKVM.Reflection.Type Type
IKVM.Reflection.MethodInfo MethodInfo
override MethodBase ResolveMethod(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
override Type[] GetGenericArguments()

◆ GetGenericArguments()

override Type[] IKVM.Reflection.Reader.MethodDefImpl.GetGenericArguments ( )

Definition at line 183 of file MethodDefImpl.cs.

184 {
185 PopulateGenericArguments();
186 return Util.Copy(typeArgs);
187 }

◆ GetGenericMethodDefinition()

override MethodInfo IKVM.Reflection.Reader.MethodDefImpl.GetGenericMethodDefinition ( )

Definition at line 223 of file MethodDefImpl.cs.

224 {
225 return IsGenericMethodDefinition ? (MethodInfo)this : throw new InvalidOperationException();
226 }

◆ GetMethodBody()

override MethodBody IKVM.Reflection.Reader.MethodDefImpl.GetMethodBody ( )

Definition at line 56 of file MethodDefImpl.cs.

57 {
58 return GetMethodBody(this);
59 }
override MethodBody GetMethodBody()

◆ GetMethodImplementationFlags()

override MethodImplAttributes IKVM.Reflection.Reader.MethodDefImpl.GetMethodImplementationFlags ( )

Definition at line 85 of file MethodDefImpl.cs.

86 {
87 return (MethodImplAttributes)module.MethodDefTable.records[index].ImplFlags;
88 }

◆ GetParameters()

override ParameterInfo[] IKVM.Reflection.Reader.MethodDefImpl.GetParameters ( )

Definition at line 90 of file MethodDefImpl.cs.

91 {
92 PopulateParameters();
93 return (ParameterInfo[])parameters.Clone();
94 }
IKVM.Reflection.ParameterInfo ParameterInfo

◆ MakeGenericMethod()

override MethodInfo IKVM.Reflection.Reader.MethodDefImpl.MakeGenericMethod ( params Type[] typeArguments)

Definition at line 228 of file MethodDefImpl.cs.

229 {
230 return new GenericMethodInstance(declaringType, this, typeArguments);
231 }

Property Documentation

◆ __MethodRVA

override int IKVM.Reflection.Reader.MethodDefImpl.__MethodRVA
get

Definition at line 70 of file MethodDefImpl.cs.

71 {
72 get { return module.MethodDefTable.records[index].RVA; }
73 }

◆ Attributes

override MethodAttributes IKVM.Reflection.Reader.MethodDefImpl.Attributes
get

Definition at line 80 of file MethodDefImpl.cs.

81 {
82 get { return (MethodAttributes)module.MethodDefTable.records[index].Flags; }
83 }

◆ CallingConvention

override CallingConventions IKVM.Reflection.Reader.MethodDefImpl.CallingConvention
get

Definition at line 75 of file MethodDefImpl.cs.

76 {
77 get { return MethodSignature.CallingConvention; }
78 }

◆ DeclaringType

override Type IKVM.Reflection.Reader.MethodDefImpl.DeclaringType
get

Definition at line 154 of file MethodDefImpl.cs.

155 {
156 get { return declaringType.IsModulePseudoType ? null : declaringType; }
157 }

◆ IsGenericMethod

override bool IKVM.Reflection.Reader.MethodDefImpl.IsGenericMethod
get

Definition at line 178 of file MethodDefImpl.cs.

179 {
180 get { return IsGenericMethodDefinition; }
181 }

◆ IsGenericMethodDefinition

override bool IKVM.Reflection.Reader.MethodDefImpl.IsGenericMethodDefinition
get

Definition at line 169 of file MethodDefImpl.cs.

170 {
171 get
172 {
173 PopulateGenericArguments();
174 return typeArgs.Length > 0;
175 }
176 }

◆ MetadataToken

override int IKVM.Reflection.Reader.MethodDefImpl.MetadataToken
get

Definition at line 164 of file MethodDefImpl.cs.

165 {
166 get { return (MethodDefTable.Index << 24) + index + 1; }
167 }

◆ Module

override Module IKVM.Reflection.Reader.MethodDefImpl.Module
get

Definition at line 233 of file MethodDefImpl.cs.

234 {
235 get { return module; }
236 }

◆ Name

override string IKVM.Reflection.Reader.MethodDefImpl.Name
get

Definition at line 159 of file MethodDefImpl.cs.

160 {
161 get { return module.GetString(module.MethodDefTable.records[index].Name); }
162 }

◆ ReturnParameter

override ParameterInfo IKVM.Reflection.Reader.MethodDefImpl.ReturnParameter
get

Definition at line 137 of file MethodDefImpl.cs.

138 {
139 get
140 {
141 PopulateParameters();
142 return returnParameter;
143 }
144 }

◆ ReturnType

override Type IKVM.Reflection.Reader.MethodDefImpl.ReturnType
get

Definition at line 146 of file MethodDefImpl.cs.

147 {
148 get
149 {
150 return MethodSignature.GetReturnType(this);
151 }
152 }

The documentation for this class was generated from the following file: