IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
MissingProperty.cs
Go to the documentation of this file.
1/*
2 Copyright (C) 2011-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*/
24namespace IKVM.Reflection
25{
26
27 // NOTE this is currently only used by CustomAttributeData (because there is no other way to refer to a property)
28 sealed class MissingProperty : PropertyInfo
29 {
30
31 readonly Type declaringType;
32 readonly string name;
33 readonly PropertySignature signature;
34
41 internal MissingProperty(Type declaringType, string name, PropertySignature signature)
42 {
43 this.declaringType = declaringType;
44 this.name = name;
45 this.signature = signature;
46 }
47
48 public override PropertyAttributes Attributes
49 {
50 get { throw new MissingMemberException(this); }
51 }
52
53 public override bool CanRead
54 {
55 get { throw new MissingMemberException(this); }
56 }
57
58 public override bool CanWrite
59 {
60 get { throw new MissingMemberException(this); }
61 }
62
63 public override MethodInfo GetGetMethod(bool nonPublic)
64 {
65 throw new MissingMemberException(this);
66 }
67
68 public override MethodInfo GetSetMethod(bool nonPublic)
69 {
70 throw new MissingMemberException(this);
71 }
72
73 public override MethodInfo[] GetAccessors(bool nonPublic)
74 {
75 throw new MissingMemberException(this);
76 }
77
78 public override object GetRawConstantValue()
79 {
80 throw new MissingMemberException(this);
81 }
82
83 internal override bool IsPublic
84 {
85 get { throw new MissingMemberException(this); }
86 }
87
88 internal override bool IsNonPrivate
89 {
90 get { throw new MissingMemberException(this); }
91 }
92
93 internal override bool IsStatic
94 {
95 get { throw new MissingMemberException(this); }
96 }
97
98 internal override PropertySignature PropertySignature
99 {
100 get { return signature; }
101 }
102
103 public override string Name
104 {
105 get { return name; }
106 }
107
108 public override Type DeclaringType
109 {
110 get { return declaringType; }
111 }
112
113 public override Module Module
114 {
115 get { return declaringType.Module; }
116 }
117
118 internal override bool IsBaked
119 {
120 get { return declaringType.IsBaked; }
121 }
122
123 internal override int GetCurrentToken()
124 {
125 throw new MissingMemberException(this);
126 }
127
128 }
129
130}
global::java.lang.invoke.LambdaForm.Name Name
override object GetRawConstantValue()
override MethodInfo GetSetMethod(bool nonPublic)
override MethodInfo GetGetMethod(bool nonPublic)
override PropertyAttributes Attributes
override MethodInfo[] GetAccessors(bool nonPublic)