IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
BuiltinArrayMethod.cs
Go to the documentation of this file.
1/*
2 Copyright (C) 2009-2015 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*/
25
26namespace IKVM.Reflection
27{
29 {
30
31 sealed class ParameterInfoImpl : ParameterInfo
32 {
33
34 readonly MethodInfo method;
35 readonly Type type;
36 readonly int pos;
37
44 internal ParameterInfoImpl(MethodInfo method, Type type, int pos)
45 {
46 this.method = method;
47 this.type = type;
48 this.pos = pos;
49 }
50
51 public override Type ParameterType
52 {
53 get { return type; }
54 }
55
56 public override string Name
57 {
58 get { return null; }
59 }
60
61 public override ParameterAttributes Attributes
62 {
63 get { return ParameterAttributes.None; }
64 }
65
66 public override int Position
67 {
68 get { return pos; }
69 }
70
71 public override object RawDefaultValue
72 {
73 get { return null; }
74 }
75
76 public override CustomModifiers __GetCustomModifiers()
77 {
78 return new CustomModifiers();
79 }
80
81 public override bool __TryGetFieldMarshal(out FieldMarshal fieldMarshal)
82 {
83 fieldMarshal = new FieldMarshal();
84 return false;
85 }
86
87 public override MemberInfo Member
88 {
89 get { return method.IsConstructor ? (MethodBase)new ConstructorInfoImpl(method) : method; }
90 }
91
92 public override int MetadataToken
93 {
94 get { return 0x08000000; }
95 }
96
97 public override Module Module
98 {
99 get { return method.Module; }
100 }
101
102 }
103
113 internal BuiltinArrayMethod(Module module, Type arrayClass, string methodName, CallingConventions callingConvention, Type returnType, Type[] parameterTypes) :
114 base(module, arrayClass, methodName, callingConvention, returnType, parameterTypes)
115 {
116
117 }
118
119 public override MethodAttributes Attributes
120 {
121 get { return this.Name == ".ctor" ? MethodAttributes.RTSpecialName | MethodAttributes.Public : MethodAttributes.Public; }
122 }
123
124 public override MethodImplAttributes GetMethodImplementationFlags()
125 {
126 return MethodImplAttributes.IL;
127 }
128
129 public override int MetadataToken
130 {
131 get { return 0x06000000; }
132 }
133
134 public override MethodBody GetMethodBody()
135 {
136 return null;
137 }
138
139 public override ParameterInfo[] GetParameters()
140 {
141 var parameterInfos = new ParameterInfo[parameterTypes.Length];
142 for (int i = 0; i < parameterInfos.Length; i++)
143 parameterInfos[i] = new ParameterInfoImpl(this, parameterTypes[i], i);
144
145 return parameterInfos;
146 }
147
148 public override ParameterInfo ReturnParameter
149 {
150 get { return new ParameterInfoImpl(this, this.ReturnType, -1); }
151 }
152
153 }
154
155}
global::java.lang.invoke.LambdaForm.Name Name
override ParameterInfo[] GetParameters()
override MethodAttributes Attributes
override MethodImplAttributes GetMethodImplementationFlags()