IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
MethodAnalyzerFactory.cs
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2014 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;
25
26#if IMPORTER
28#endif
29
30
31namespace IKVM.Runtime
32{
37 {
38
39 readonly RuntimeContext _context;
40
41 public readonly RuntimeJavaType ByteArrayType;
42 public readonly RuntimeJavaType BooleanArrayType;
43 public readonly RuntimeJavaType ShortArrayType;
44 public readonly RuntimeJavaType CharArrayType;
45 public readonly RuntimeJavaType IntArrayType;
46 public readonly RuntimeJavaType FloatArrayType;
47 public readonly RuntimeJavaType DoubleArrayType;
48 public readonly RuntimeJavaType LongArrayType;
49 public readonly RuntimeJavaType JavaLangThreadDeathType;
50
56 {
57 _context = context ?? throw new ArgumentNullException(nameof(context));
58 ByteArrayType = context.PrimitiveJavaTypeFactory.BYTE.MakeArrayType(1);
59 BooleanArrayType = context.PrimitiveJavaTypeFactory.BOOLEAN.MakeArrayType(1);
60 ShortArrayType = context.PrimitiveJavaTypeFactory.SHORT.MakeArrayType(1);
61 CharArrayType = context.PrimitiveJavaTypeFactory.CHAR.MakeArrayType(1);
62 IntArrayType = context.PrimitiveJavaTypeFactory.INT.MakeArrayType(1);
63 FloatArrayType = context.PrimitiveJavaTypeFactory.FLOAT.MakeArrayType(1);
64 DoubleArrayType = context.PrimitiveJavaTypeFactory.DOUBLE.MakeArrayType(1);
65 LongArrayType = context.PrimitiveJavaTypeFactory.LONG.MakeArrayType(1);
66 JavaLangThreadDeathType = context.ClassLoaderFactory.LoadClassCritical("java.lang.ThreadDeath");
67 }
68
79 public MethodAnalyzer Create(RuntimeJavaType host, RuntimeJavaType wrapper, RuntimeJavaMethod mw, ClassFile classFile, ClassFile.Method method, RuntimeClassLoader classLoader)
80 {
81 return new MethodAnalyzer(_context, host, wrapper, mw, classFile, method, classLoader);
82 }
83
84 }
85
86}
Provides instances of MethodAnalyzer.
readonly RuntimeJavaType JavaLangThreadDeathType
readonly RuntimeJavaType BooleanArrayType
MethodAnalyzer Create(RuntimeJavaType host, RuntimeJavaType wrapper, RuntimeJavaMethod mw, ClassFile classFile, ClassFile.Method method, RuntimeClassLoader classLoader)
Creates a new MethodAnalyzer.
MethodAnalyzerFactory(RuntimeContext context)
Initializes a new instance.
Runtime support for a class loader.
Maintains services relevant to an instane of the IKVM runtime.
RuntimePrimitiveJavaTypeFactory PrimitiveJavaTypeFactory
Gets the RuntimePrimitiveJavaTypeFactory associated with this instance of the runtime.
RuntimeClassLoaderFactory ClassLoaderFactory
Gets the RuntimeClassLoaderFactory associated with this instance of the runtime.