IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
MiscHelper.cs
Go to the documentation of this file.
1/*
2 Copyright (C) 2007-2015 Jeroen Frijters
3 Copyright (C) 2009 Volker Berlin (i-net software)
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20
21 Jeroen Frijters
22 jeroen@frijters.net
23
24*/
25using System;
26using System.Reflection;
27
28using IKVM.Runtime;
29
31{
32
33 static class MiscHelper
34 {
35
36 public static object getAssemblyClassLoader(Assembly asm, object extcl)
37 {
38#if FIRST_PASS
39 throw new NotImplementedException();
40#else
41 if (extcl == null || asm.IsDefined(typeof(IKVM.Attributes.CustomAssemblyClassLoaderAttribute), false))
42 {
43 return JVM.Context.AssemblyClassLoaderFactory.FromAssembly(asm).GetJavaClassLoader();
44 }
45
46 return null;
47#endif
48 }
49
50 }
51
52}
IKVM.Reflection.Assembly Assembly
Marks an assembly such that it's types are considered to be loaded by the specified class loader type...
static object getAssemblyClassLoader(Assembly asm, object extcl)
Definition MiscHelper.cs:36
Main state of the running JVM.
RuntimeAssemblyClassLoader FromAssembly(Assembly assembly)
Obtains the RuntimeAssemblyClassLoader for the given Assembly. This method should not be used with dy...
RuntimeAssemblyClassLoaderFactory AssemblyClassLoaderFactory
Gets the RuntimeAssemblyClassLoaderFactory associated with this instance of the runtime.