IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
MissingAssembly.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*/
24using System.Collections.Generic;
25
26namespace IKVM.Reflection
27{
28
29 sealed class MissingAssembly : Assembly
30 {
31
32 readonly MissingModule module;
33
39 internal MissingAssembly(Universe universe, string name) :
40 base(universe)
41 {
42 module = new MissingModule(this, -1);
43 fullName = name;
44 }
45
46 public override Type[] GetTypes()
47 {
48 throw new MissingAssemblyException(this);
49 }
50
51 public override AssemblyName GetName()
52 {
53 return new AssemblyName(fullName);
54 }
55
56 public override string ImageRuntimeVersion
57 {
58 get { throw new MissingAssemblyException(this); }
59 }
60
61 public override Module ManifestModule
62 {
63 get { return module; }
64 }
65
66 public override MethodInfo EntryPoint
67 {
68 get { throw new MissingAssemblyException(this); }
69 }
70
71 public override string Location
72 {
73 get { throw new MissingAssemblyException(this); }
74 }
75
76 public override AssemblyName[] GetReferencedAssemblies()
77 {
78 throw new MissingAssemblyException(this);
79 }
80
81 public override Module[] GetModules(bool getResourceModules)
82 {
83 throw new MissingAssemblyException(this);
84 }
85
86 public override Module[] GetLoadedModules(bool getResourceModules)
87 {
88 throw new MissingAssemblyException(this);
89 }
90
91 public override Module GetModule(string name)
92 {
93 throw new MissingAssemblyException(this);
94 }
95
96 public override string[] GetManifestResourceNames()
97 {
98 throw new MissingAssemblyException(this);
99 }
100
101 public override ManifestResourceInfo GetManifestResourceInfo(string resourceName)
102 {
103 throw new MissingAssemblyException(this);
104 }
105
106 public override System.IO.Stream GetManifestResourceStream(string resourceName)
107 {
108 throw new MissingAssemblyException(this);
109 }
110
111 public override bool __IsMissing
112 {
113 get { return true; }
114 }
115
116 internal override Type FindType(TypeName typeName)
117 {
118 return null;
119 }
120
121 internal override Type FindTypeIgnoreCase(TypeName lowerCaseName)
122 {
123 return null;
124 }
125
126 internal override IList<CustomAttributeData> GetCustomAttributesData(Type attributeType)
127 {
128 throw new MissingAssemblyException(this);
129 }
130
131 }
132
133}
IKVM.Reflection.Type Type
IKVM.Reflection.AssemblyName AssemblyName
override string[] GetManifestResourceNames()
override ManifestResourceInfo GetManifestResourceInfo(string resourceName)
override System.IO.Stream GetManifestResourceStream(string resourceName)
override Module[] GetModules(bool getResourceModules)
override Module[] GetLoadedModules(bool getResourceModules)
override AssemblyName[] GetReferencedAssemblies()
override Module GetModule(string name)
override AssemblyName GetName()