if (method.DeclaringType.DeclaringType != null) return;
    void checkMain(MethodBase method) {	//log("checking method: " + method);	if ( ! currentClass.isModuleClass() )	    return;	if (method.IsConstructor || method.IsAbstract ||	    !method.Name.equals("main"))	    return;	ParameterInfo[] params = method.GetParameters();	if (params.length != 1)	    return;	if (params[0].ParameterType != tc.STRING_ARRAY)	    return;	//log("'main' method found: " + method);	mains.put(currentClass, method);	ILGenerator code = main.GetILGenerator();	code.Emit(OpCodes.Ldsfld, tc.getModuleField(currentClass));	code.Emit(OpCodes.Ldarg_0);	code.Emit(OpCodes.Callvirt, (MethodInfo)method);	if (!returnsVoid(main))	    code.Emit(OpCodes.Pop);    }