Add license and copyright to all source files in corlib
[mono.git] / mcs / class / corlib / System.Reflection.Emit / EnumBuilder.cs
1
2 //
3 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
4 //
5 // Permission is hereby granted, free of charge, to any person obtaining
6 // a copy of this software and associated documentation files (the
7 // "Software"), to deal in the Software without restriction, including
8 // without limitation the rights to use, copy, modify, merge, publish,
9 // distribute, sublicense, and/or sell copies of the Software, and to
10 // permit persons to whom the Software is furnished to do so, subject to
11 // the following conditions:
12 // 
13 // The above copyright notice and this permission notice shall be
14 // included in all copies or substantial portions of the Software.
15 // 
16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 //
24
25 //
26 // System.Reflection.Emit/EnumBuilder.cs
27 //
28 // Author:
29 //   Paolo Molaro (lupus@ximian.com)
30 //
31 // (C) 2001 Ximian, Inc.  http://www.ximian.com
32 //
33
34 using System;
35 using System.Reflection;
36 using System.Reflection.Emit;
37 using System.Globalization;
38 using System.Runtime.CompilerServices;
39
40 namespace System.Reflection.Emit {
41         public sealed class EnumBuilder : Type {
42                 CustomAttributeBuilder[] cattrs;
43
44                 public override Assembly Assembly {
45                         get { return null; }
46                 }
47                 public override string AssemblyQualifiedName {
48                         get { return null; }
49                 }
50                 public override Type BaseType {
51                         get { return null; }
52                 }
53                 public override Type DeclaringType {
54                         get { return null; }
55                 }
56                 public override string FullName {
57                         get { return null; }
58                 }
59                 public override Guid GUID {
60                         get { return Guid.Empty; }
61                 }
62                 public override Module Module {
63                         get { return null; }
64                 }
65                 public override string Name {
66                         get { return null; }
67                 }
68                 public override string Namespace {
69                         get { return null; }
70                 }
71                 public override Type ReflectedType {
72                         get { return null; }
73                 }
74                 public override RuntimeTypeHandle TypeHandle {
75                         get { return new RuntimeTypeHandle (); }
76                 }
77                 public TypeToken TypeToken {
78                         get { return new TypeToken (); }
79                 }
80                 public FieldBuilder UnderlyingField {
81                         get { return null; }
82                 }
83                 public override Type UnderlyingSystemType {
84                         get { return null; }
85                 }
86 /* no need to override
87                 public override MemberTypes MemberType {
88                         get {return MemberTypes.TypeInfo;}
89                 }
90 */
91
92                 internal EnumBuilder (ModuleBuilder mb, string name, TypeAttributes visibility, Type underlyingType)
93                 {
94                 }
95
96                 public Type CreateType ()
97                 {
98                         return null;
99                 }
100
101                 public FieldBuilder DefineLiteral (string literalName, object literalValue)
102                 {
103                         return null;
104                 }
105                 protected override TypeAttributes GetAttributeFlagsImpl ()
106                 {
107                         return (TypeAttributes)0;
108                 }
109
110                 protected override ConstructorInfo GetConstructorImpl (
111                         BindingFlags bindingAttr, Binder binder, CallingConventions cc,
112                         Type[] types, ParameterModifier[] modifiers)
113                 {
114                         return null;
115                 }
116
117                 public override ConstructorInfo[] GetConstructors( BindingFlags bindingAttr)
118                 {
119                         return null;
120                 }
121
122                 public override object[] GetCustomAttributes(bool inherit)
123                 {
124                         return null;
125                 }
126
127                 public override object[] GetCustomAttributes(Type attributeType, bool inherit)
128                 {
129                         return null;
130                 }
131
132                 public override Type GetElementType()
133                 {
134                         throw new NotSupportedException ();
135                 }
136
137                 public override EventInfo GetEvent( string name, BindingFlags bindingAttr)
138                 {
139                         return null;
140                 }
141
142                 public override EventInfo[] GetEvents()
143                 {
144                         return null;
145                 }
146
147                 public override EventInfo[] GetEvents( BindingFlags bindingAttr)
148                 {
149                         return null;
150                 }
151
152                 public override FieldInfo GetField( string name, BindingFlags bindingAttr)
153                 {
154                         return null;
155                 }
156
157                 public override FieldInfo[] GetFields( BindingFlags bindingAttr)
158                 {
159                         return null;
160                 }
161
162                 public override Type GetInterface( string name, bool ignoreCase)
163                 {
164                         return null;
165                 }
166
167                 public override InterfaceMapping GetInterfaceMap( Type interfaceType)
168                 {
169                         throw new NotImplementedException ();
170                 }
171
172                 public override Type[] GetInterfaces()
173                 {
174                         return null;
175                 }
176
177                 public override MemberInfo[] GetMember( string name, MemberTypes type, BindingFlags bindingAttr)
178                 {
179                         return null;
180                 }
181
182                 public override MemberInfo[] GetMembers( BindingFlags bindingAttr)
183                 {
184                         return null;
185                 }
186
187                 protected override MethodInfo GetMethodImpl (
188                         string name, BindingFlags bindingAttr, Binder binder,
189                         CallingConventions callConvention, Type[] types,
190                         ParameterModifier[] modifiers)
191                 {
192                         // FIXME
193                         return null;
194                 }
195                 
196                 public override MethodInfo[] GetMethods( BindingFlags bindingAttr)
197                 {
198                         return null;
199                 }
200
201                 public override Type GetNestedType( string name, BindingFlags bindingAttr)
202                 {
203                         return null;
204                 }
205
206                 public override Type[] GetNestedTypes( BindingFlags bindingAttr)
207                 {
208                         return null;
209                 }
210
211                 public override PropertyInfo[] GetProperties( BindingFlags bindingAttr)
212                         {
213                         return null;
214                 }
215
216                 protected override PropertyInfo GetPropertyImpl (
217                         string name, BindingFlags bindingAttr, Binder binder,
218                         Type returnType, Type[] types,
219                         ParameterModifier[] modifiers)
220                 {
221                         return null;
222                 }
223
224                 protected override bool HasElementTypeImpl()
225                         {
226                         throw new NotSupportedException ();
227                 }
228
229                 public override object InvokeMember (
230                         string name, BindingFlags invokeAttr, Binder binder,
231                         object target, object[] args,
232                         ParameterModifier[] modifiers, CultureInfo culture,
233                         string[] namedParameters)
234                 {
235                         return null;
236                 }
237
238                 protected override bool IsArrayImpl()
239                 {
240                         return false;
241                 }
242
243                 protected override bool IsByRefImpl()
244                 {
245                         return false;
246                 }
247
248                 protected override bool IsCOMObjectImpl()
249                 {
250                         return false;
251                 }
252
253                 protected override bool IsPointerImpl()
254                 {
255                         return false;
256                 }
257
258                 protected override bool IsPrimitiveImpl()
259                 {
260                         return false;
261                 }
262                 
263                 protected override bool IsValueTypeImpl()
264                 {
265                         return true;
266                 }
267
268                 public override bool IsDefined( Type attributeType, bool inherit)
269                 {
270                         return false;
271                 }
272                 
273                 public void SetCustomAttribute( CustomAttributeBuilder customBuilder)
274                 {
275                         if (cattrs != null) {
276                                 CustomAttributeBuilder[] new_array = new CustomAttributeBuilder [cattrs.Length + 1];
277                                 cattrs.CopyTo (new_array, 0);
278                                 new_array [cattrs.Length] = customBuilder;
279                                 cattrs = new_array;
280                         } else {
281                                 cattrs = new CustomAttributeBuilder [1];
282                                 cattrs [0] = customBuilder;
283                         }
284                 }
285
286                 public void SetCustomAttribute( ConstructorInfo con, byte[] binaryAttribute)
287                 {
288                         SetCustomAttribute (new CustomAttributeBuilder (con, binaryAttribute));
289                 }
290
291 #if NET_2_0 || BOOTSTRAP_NET_2_0
292                 public override Type[] GetGenericArguments ()
293                 {
294                         throw new NotImplementedException ();
295                 }
296
297                 public override bool HasGenericArguments {
298                         get {
299                                 throw new NotImplementedException ();
300                         }
301                 }
302
303                 public override bool ContainsGenericParameters {
304                         get {
305                                 throw new NotImplementedException ();
306                         }
307                 }
308
309                 public override bool IsGenericParameter {
310                         get {
311                                 throw new NotImplementedException ();
312                         }
313                 }
314
315                 public override int GenericParameterPosition {
316                         get {
317                                 throw new NotImplementedException ();
318                         }
319                 }
320
321                 public override MethodInfo DeclaringMethod {
322                         get {
323                                 throw new NotImplementedException ();
324                         }
325                 }
326 #endif
327         }
328 }