You've already forked linux-packaging-mono
Imported Upstream version 4.2.1.36
Former-commit-id: f3008ca867fe7e4b7ae9b9a8844c0ad5798925a9
This commit is contained in:
committed by
Jo Shields
parent
afe402035c
commit
ea5caba957
73
external/ikvm/runtime/openjdk/java.lang.cs
vendored
73
external/ikvm/runtime/openjdk/java.lang.cs
vendored
@@ -34,7 +34,7 @@ using IKVM.Internal;
|
||||
|
||||
static class Java_java_lang_Class
|
||||
{
|
||||
public static java.lang.Class forName0(string name, bool initialize, java.lang.ClassLoader loader)
|
||||
public static java.lang.Class forName0(string name, bool initialize, java.lang.ClassLoader loader, java.lang.Class caller)
|
||||
{
|
||||
#if FIRST_PASS
|
||||
return null;
|
||||
@@ -80,6 +80,11 @@ static class Java_java_lang_Class
|
||||
throw x.ToJava();
|
||||
}
|
||||
}
|
||||
java.security.ProtectionDomain pd;
|
||||
if (loader != null && caller != null && (pd = getProtectionDomain0(caller)) != null)
|
||||
{
|
||||
loader.checkPackageAccess(tw.ClassObject, pd);
|
||||
}
|
||||
if (initialize && !tw.IsArray)
|
||||
{
|
||||
try
|
||||
@@ -538,13 +543,14 @@ static class Java_java_lang_Class
|
||||
throw new ClassFormatError(wrapper.Name);
|
||||
}
|
||||
MethodWrapper[] methods = wrapper.GetMethods();
|
||||
List<java.lang.reflect.Method> list = new List<java.lang.reflect.Method>();
|
||||
List<java.lang.reflect.Method> list = new List<java.lang.reflect.Method>(methods.Length);
|
||||
for (int i = 0; i < methods.Length; i++)
|
||||
{
|
||||
// we don't want to expose "hideFromReflection" methods (one reason is that it would
|
||||
// mess up the serialVersionUID computation)
|
||||
if (!methods[i].IsHideFromReflection
|
||||
&& methods[i].Name != "<clinit>" && methods[i].Name != "<init>"
|
||||
&& !methods[i].IsConstructor
|
||||
&& !methods[i].IsClassInitializer
|
||||
&& (!publicOnly || methods[i].IsPublic))
|
||||
{
|
||||
list.Add((java.lang.reflect.Method)methods[i].ToMethodOrConstructor(false));
|
||||
@@ -590,7 +596,7 @@ static class Java_java_lang_Class
|
||||
// we don't want to expose "hideFromReflection" methods (one reason is that it would
|
||||
// mess up the serialVersionUID computation)
|
||||
if (!methods[i].IsHideFromReflection
|
||||
&& methods[i].Name == "<init>"
|
||||
&& methods[i].IsConstructor
|
||||
&& (!publicOnly || methods[i].IsPublic))
|
||||
{
|
||||
list.Add((java.lang.reflect.Constructor)methods[i].ToMethodOrConstructor(false));
|
||||
@@ -1168,6 +1174,65 @@ static class Java_java_lang_StrictMath
|
||||
|
||||
static class Java_java_lang_System
|
||||
{
|
||||
public static void registerNatives()
|
||||
{
|
||||
}
|
||||
|
||||
public static void setIn0(object @in)
|
||||
{
|
||||
#if !FIRST_PASS
|
||||
java.lang.StdIO.@in = (java.io.InputStream)@in;
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void setOut0(object @out)
|
||||
{
|
||||
#if !FIRST_PASS
|
||||
java.lang.StdIO.@out = (java.io.PrintStream)@out;
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void setErr0(object err)
|
||||
{
|
||||
#if !FIRST_PASS
|
||||
java.lang.StdIO.err = (java.io.PrintStream)err;
|
||||
#endif
|
||||
}
|
||||
|
||||
public static object initProperties(object props)
|
||||
{
|
||||
#if FIRST_PASS
|
||||
return null;
|
||||
#else
|
||||
java.lang.VMSystemProperties.initProperties((java.util.Properties)props);
|
||||
return props;
|
||||
#endif
|
||||
}
|
||||
|
||||
public static string mapLibraryName(string libname)
|
||||
{
|
||||
#if FIRST_PASS
|
||||
return null;
|
||||
#else
|
||||
if (libname == null)
|
||||
{
|
||||
throw new java.lang.NullPointerException();
|
||||
}
|
||||
if (ikvm.@internal.Util.WINDOWS)
|
||||
{
|
||||
return libname + ".dll";
|
||||
}
|
||||
else if (ikvm.@internal.Util.MACOSX)
|
||||
{
|
||||
return "lib" + libname + ".jnilib";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "lib" + libname + ".so";
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void arraycopy(object src, int srcPos, object dest, int destPos, int length)
|
||||
{
|
||||
IKVM.Runtime.ByteCodeHelper.arraycopy(src, srcPos, dest, destPos, length);
|
||||
|
Reference in New Issue
Block a user