Runtime { @Nullable public static Class<?> getMainClass() { return LazyMain.MAIN_CLASS; } private  Runtime(); static org.spf4j.base.Version getAppVersion(); static String getAppVersionString(); static ApplicationInfo getApplicationInfo(); static boolean isShuttingDown(); @SuppressWarnings("checkstyle:regexp") static void error(final String message); @SuppressWarnings("checkstyle:regexp") static void error(final String message, final Throwable t); @SuppressWarnings("checkstyle:regexp") static void errorNoPackageDetail(final String message, final Throwable t); static void goDownWithError(final SysExits exitCode); static void goDownWithError(@Nullable final Throwable t, final SysExits exitCode); @SuppressFBWarnings("MDM_RUNTIME_EXIT_OR_HALT") static void goDownWithError(@Nullable final Throwable t, final int exitCode); @Deprecated static boolean isMacOsx(); @Deprecated static boolean isWindows(); static boolean isTestFramework(); @Deprecated static boolean haveJnaPlatform(); @Deprecated static boolean haveJnaPlatformClib(); @CheckReturnValue @Deprecated static int getNrOpenFiles(); @Nullable @CheckReturnValue @Deprecated static CharSequence getLsofOutput(); @Deprecated static CharSequence run(final String[] command,
          final long timeoutMillis); @Deprecated static int killProcess(final Process proc, final long terminateTimeoutMillis,
          final long forceTerminateTimeoutMillis); static int run(final String[] command, final ProcOutputHandler handler,
          final long timeoutMillis); @SuppressFBWarnings("COMMAND_INJECTION") @Deprecated static int run(final String[] command, final ProcOutputHandler handler,
          final long timeoutMillis, final long terminationTimeoutMillis); static void queueHookAtBeginning(final Runnable runnable); static void queueHookAtEnd(final Runnable runnable); static void queueHook(final int priority, final Runnable runnable); static boolean removeQueuedShutdownHook(final Runnable runnable); @Deprecated static long getDeadline(); @Deprecated static long millisToDeadline(); @SuppressFBWarnings static boolean gc(final long timeoutMillis); static CharSequence jrun(final Class<?> classWithMain,
          final long timeoutMillis, final String... arguments); static CharSequence jrun(final Class<?> classWithMain, final String classPath, final long timeoutMillis,
          final String... arguments); static synchronized void setCurrentDir(final String sourceAbsolutePath); static synchronized String getCurrentDir(); static CharSequence jrun(final Class<?> classWithMain, final String classPath, final long timeoutMillis,
          final String[] jvmArgs,
          final String... arguments); static void jrunAndLog(final Class<?> classWithMain,
          final long timeoutMillis, final String... arguments); static void jrunAndLog(final Class<?> classWithMain, final String classPath, final long timeoutMillis,
          final String... arguments); static void jrunAndLog(final Class<?> classWithMain, final String classPath, final long timeoutMillis,
          final String[] jvmArgs,
          final String... arguments); @Nullable static Thread getMainThread(); @Nullable static Class<?> getMainClass(); static final boolean IS_LITTLE_ENDIAN; static final long WAIT_FOR_SHUTDOWN_NANOS; static final String TMP_FOLDER; static final Path TMP_FOLDER_PATH; static final String JAVA_VERSION; static final String USER_NAME; static final String USER_DIR; static final String USER_HOME; static final String JAVA_HOME; static final int PID; static final String PROCESS_NAME; static final String OS_NAME; static final String PROCESS_ID; static final int NR_PROCESSORS; static final Version JAVA_PLATFORM; }
@Test public void testMainClass() throws NoSuchMethodException { Class<?> mainClass = Runtime.getMainClass(); Assert.assertNotNull(mainClass); Method method = mainClass.getMethod("main", String[].class); Assert.assertNotNull(method); }