private boolean useAutoCompile() { return appSettings.autoCompile().or(Boolean.TRUE) && useHotCompile(); }
private boolean useAutoCompile() { return appSettings.autoCompile().or(Boolean.TRUE) && useHotCompile(); }
private boolean useHotCompile() { if (appSettings.hotCompile().or(Boolean.FALSE) || appSettings.autoCompile().or(Boolean.FALSE)) { // hotcompile or autocompile is explicitly set if (!appSettings.appPackage().isPresent()) { logger.info("can't enable hot compile: restx.app.package is not set.\n" + "Run your app with -Drestx.app.package=<app.base.package> to enable hot compile."); return false; } else if (!hasSystemJavaCompiler()) { logger.info("can't enable hot compile: tools.jar is not in classpath.\n" + "Run your app with a JDK rather than a JRE to enable hot compile."); return false; } else { return true; } } else { return appSettings.hotCompile().or(Boolean.TRUE) && !getMode().equals(RestxContext.Modes.PROD) && !getMode().equals(RestxContext.Modes.TEST) && appSettings.appPackage().isPresent() && hasSystemJavaCompiler(); } }
private boolean useHotCompile() { if (appSettings.hotCompile().or(Boolean.FALSE) || appSettings.autoCompile().or(Boolean.FALSE)) { // hotcompile or autocompile is explicitly set if (!appSettings.appPackage().isPresent()) { logger.info("can't enable hot compile: restx.app.package is not set.\n" + "Run your app with -Drestx.app.package=<app.base.package> to enable hot compile."); return false; } else if (!hasSystemJavaCompiler()) { logger.info("can't enable hot compile: tools.jar is not in classpath.\n" + "Run your app with a JDK rather than a JRE to enable hot compile."); return false; } else { return true; } } else { return appSettings.hotCompile().or(Boolean.TRUE) && !getMode().equals(RestxContext.Modes.PROD) && !getMode().equals(RestxContext.Modes.TEST) && appSettings.appPackage().isPresent() && hasSystemJavaCompiler(); } }