From cbeeb203184b596c9174009b272905cc9d8388d9 Mon Sep 17 00:00:00 2001 From: jfrijters Date: Tue, 3 Jun 2008 07:13:49 +0000 Subject: [PATCH] Marked all static classes as static. --- runtime/ClassFile.cs | 2 +- runtime/MemberWrapper.cs | 2 +- runtime/TypeWrapper.cs | 14 ++++++-------- runtime/compiler.cs | 2 +- runtime/openjdk.cs | 4 ++-- runtime/vm.cs | 6 ++---- 6 files changed, 13 insertions(+), 17 deletions(-) diff --git a/runtime/ClassFile.cs b/runtime/ClassFile.cs index cc50c068..166461e6 100644 --- a/runtime/ClassFile.cs +++ b/runtime/ClassFile.cs @@ -81,7 +81,7 @@ namespace IKVM.Internal private string signature; private string[] enclosingMethod; - private class SupportedVersions + private static class SupportedVersions { internal static readonly int Minimum = 45; internal static readonly int Maximum = 50; diff --git a/runtime/MemberWrapper.cs b/runtime/MemberWrapper.cs index caa87250..521710ce 100644 --- a/runtime/MemberWrapper.cs +++ b/runtime/MemberWrapper.cs @@ -867,7 +867,7 @@ namespace IKVM.Internal } #if !COMPACT_FRAMEWORK - private class NonvirtualInvokeHelper + private static class NonvirtualInvokeHelper { private static Hashtable cache; private static ModuleBuilder module; diff --git a/runtime/TypeWrapper.cs b/runtime/TypeWrapper.cs index 073b7fba..8ea62d61 100644 --- a/runtime/TypeWrapper.cs +++ b/runtime/TypeWrapper.cs @@ -51,13 +51,11 @@ namespace IKVM.Internal } #if !COMPACT_FRAMEWORK - class EmitHelper + static class EmitHelper { private static MethodInfo objectToString = typeof(object).GetMethod("ToString", BindingFlags.Public | BindingFlags.Instance, null, Type.EmptyTypes, null); private static MethodInfo verboseCastFailure = JVM.SafeGetEnvironmentVariable("IKVM_VERBOSE_CAST") == null ? null : ByteCodeHelperMethods.VerboseCastFailure; - static EmitHelper() {} - internal static void Throw(ILGenerator ilgen, string dottedClassName) { TypeWrapper exception = ClassLoaderWrapper.GetBootstrapClassLoader().LoadClassByDottedName(dottedClassName); @@ -128,7 +126,7 @@ namespace IKVM.Internal } #endif - class AttributeHelper + static class AttributeHelper { #if !COMPACT_FRAMEWORK private static CustomAttributeBuilder hideFromJavaAttribute; @@ -3549,7 +3547,7 @@ namespace IKVM.Internal } #if !COMPACT_FRAMEWORK - class BakedTypeCleanupHack + static class BakedTypeCleanupHack { private static readonly FieldInfo m_methodBuilder = typeof(ConstructorBuilder).GetField("m_methodBuilder", BindingFlags.Instance | BindingFlags.NonPublic); private static readonly FieldInfo[] methodBuilderFields = GetFieldList(typeof(MethodBuilder), new string[] @@ -7410,7 +7408,7 @@ namespace IKVM.Internal } #if !STATIC_COMPILER - internal class JniProxyBuilder + internal static class JniProxyBuilder { private static ModuleBuilder mod; private static int count; @@ -7462,7 +7460,7 @@ namespace IKVM.Internal } #endif // !STATIC_COMPILER - private class JniBuilder + private static class JniBuilder { #if STATIC_COMPILER private static readonly Type localRefStructType = StaticCompiler.GetType("IKVM.Runtime.JNI+Frame"); @@ -7674,7 +7672,7 @@ namespace IKVM.Internal } } - class TraceHelper + private static class TraceHelper { #if STATIC_COMPILER private readonly static MethodInfo methodIsTracedMethod = typeof(Tracer).GetMethod("IsTracedMethod"); diff --git a/runtime/compiler.cs b/runtime/compiler.cs index f809073a..0acd776e 100644 --- a/runtime/compiler.cs +++ b/runtime/compiler.cs @@ -39,7 +39,7 @@ using ExceptionTableEntry = IKVM.Internal.ClassFile.Method.ExceptionTableEntry; using LocalVariableTableEntry = IKVM.Internal.ClassFile.Method.LocalVariableTableEntry; using Instruction = IKVM.Internal.ClassFile.Method.Instruction; -class ByteCodeHelperMethods +static class ByteCodeHelperMethods { internal static readonly MethodInfo GetClassFromTypeHandle; internal static readonly MethodInfo multianewarray; diff --git a/runtime/openjdk.cs b/runtime/openjdk.cs index 7c69c90d..1a64b7b4 100644 --- a/runtime/openjdk.cs +++ b/runtime/openjdk.cs @@ -121,7 +121,7 @@ using ssaGetPropertyAction = sun.security.action.GetPropertyAction; using sndResolverConfigurationImpl = sun.net.dns.ResolverConfigurationImpl; #endif -sealed class DynamicMethodSupport +static class DynamicMethodSupport { // MONOBUG as of Mono 1.2.5.1, DynamicMethod is too broken to be used internal static readonly bool Enabled = IsFullTrust && Type.GetType("Mono.Runtime") == null; @@ -885,7 +885,7 @@ namespace IKVM.NativeCode.java } } - sealed class VirtualFileSystem + static class VirtualFileSystem { internal static readonly string RootPath = JVM.IsUnix ? "/.virtual-ikvm-home/" : @"C:\.virtual-ikvm-home\"; diff --git a/runtime/vm.cs b/runtime/vm.cs index 1e67a512..d70dd3d7 100644 --- a/runtime/vm.cs +++ b/runtime/vm.cs @@ -35,10 +35,8 @@ using IKVM.Internal; #if !STATIC_COMPILER && !COMPACT_FRAMEWORK namespace IKVM.Internal { - public sealed class Starter + public static class Starter { - private Starter() {} - public static void PrepareForSaveDebugImage() { JVM.IsSaveDebugImage = true; @@ -66,7 +64,7 @@ namespace IKVM.Internal namespace IKVM.Internal { - class JVM + static class JVM { #if STATIC_COMPILER internal const bool IsStaticCompiler = true;