IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
TypeParameterType.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
27{
28 abstract class TypeParameterType : TypeInfo
29 {
30
35 protected TypeParameterType(byte sigElementType) :
36 base(sigElementType)
37 {
38
39 }
40
41 public sealed override string AssemblyQualifiedName
42 {
43 get { return null; }
44 }
45
46 protected sealed override bool IsValueTypeImpl
47 {
48 get { return (this.GenericParameterAttributes & GenericParameterAttributes.NotNullableValueTypeConstraint) != 0; }
49 }
50
51 public sealed override Type BaseType
52 {
53 get
54 {
55 foreach (var type in GetGenericParameterConstraints())
56 if (!type.IsInterface && !type.IsGenericParameter)
57 return type;
58
59 return this.IsValueType ? this.Module.Universe.System_ValueType : this.Module.Universe.System_Object;
60 }
61 }
62
63 public override Type[] __GetDeclaredInterfaces()
64 {
65 var list = new List<Type>();
66 foreach (var type in GetGenericParameterConstraints())
67 if (type.IsInterface)
68 list.Add(type);
69
70 return list.ToArray();
71 }
72
73 public sealed override TypeAttributes Attributes
74 {
75 get { return TypeAttributes.Public; }
76 }
77
78 public sealed override string FullName
79 {
80 get { return null; }
81 }
82
83 public sealed override string ToString()
84 {
85 return this.Name;
86 }
87
88 protected sealed override bool ContainsMissingTypeImpl
89 {
90 get { return ContainsMissingType(GetGenericParameterConstraints()); }
91 }
92 }
93
94}
global::java.lang.invoke.LambdaForm.Name Name
TypeParameterType(byte sigElementType)
Initializes a new instance.