IKVM11
11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
VfsAssemblyClassFile.cs
Go to the documentation of this file.
1
using
System
;
2
using
System.IO;
3
4
using
IKVM.Runtime
;
5
using
IKVM.Runtime.Accessors.Java.Lang
;
6
7
namespace
IKVM.Runtime.Vfs
8
{
9
13
internal
sealed
class
VfsAssemblyClassFile : VfsFile
14
{
15
16
readonly RuntimeJavaType type;
17
readonly Lazy<byte[]> buff;
18
24
internal
VfsAssemblyClassFile(VfsContext context, RuntimeJavaType type) :
25
base(context)
26
{
27
this.type = type ??
throw
new
ArgumentNullException(nameof(type));
28
this.buff =
new
Lazy<byte[]>(GenerateClassFile,
true
);
29
}
30
35
byte
[] GenerateClassFile()
36
{
37
#if FIRST_PASS || IMPORTER || EXPORTER
38
throw
new
NotImplementedException();
39
#else
40
var stream =
new
MemoryStream();
41
Context.Context.
StubGenerator
.Write(stream, type,
true
,
true
,
true
,
true
,
false
);
42
return
stream.ToArray();
43
#endif
44
}
45
50
protected
override
Stream OpenRead() =>
new
MemoryStream(buff.Value);
51
55
public
override
long
Size => buff.Value.Length;
56
57
}
58
59
}
IKVM.Runtime.RuntimeContext.StubGenerator
StubGenerator StubGenerator
Gets the StubGenerator associated with this instance of the runtime.
Definition
RuntimeContext.cs:186
IKVM.Runtime.Accessors.Java.Lang
Definition
ClassAccessor.cs:4
IKVM.Runtime.Vfs
Definition
VfsAssemblyClassDirectory.cs:11
IKVM.Runtime
Definition
Accessor.cs:5
System
Definition
HexConverter.cs:9
src
IKVM.Runtime
Vfs
VfsAssemblyClassFile.cs
Generated by
1.12.0