Class Sandbox
- java.lang.Object
-
- org.adoptopenjdk.jitwatch.sandbox.Sandbox
-
public class Sandbox extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private LanguageManagerlanguageManagerprivate IExternalProcesslastProcessprivate static com.chrisnewland.freelogj.Loggerloggerprivate ILogListenerlogListenerprivate ILogParserlogParserstatic java.nio.file.PathPATH_STD_ERRstatic java.nio.file.PathPATH_STD_OUTstatic java.nio.file.PathSANDBOX_CLASS_DIRstatic java.nio.file.PathSANDBOX_DIRprivate static java.lang.StringSANDBOX_LOGFILEstatic java.nio.file.PathSANDBOX_SOURCE_DIRprivate java.io.FilesandboxLogFileprivate ISandboxStagesandboxStage
-
Constructor Summary
Constructors Constructor Description Sandbox(ILogParser parser, ILogListener logger, ISandboxStage sandboxStage)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.util.List<java.lang.String>buildUniqueClasspath(JITWatchConfig config)private static voidcopyExamples()private booleanexecuteClass(java.lang.String fqClassName, IRuntime runtime, boolean intelMode)IExternalProcessgetLastProcess()private IMetaMembergetMemberForClass(java.lang.String openClassInTriView, IReadOnlyJITDataModel model)private static voidinitialise()voidreset()private voidrunJITWatch()voidrunSandbox(java.lang.String language, java.util.List<java.io.File> compileList, java.io.File fileToRun)private voidshowTriView(java.lang.String language, java.lang.String openClassInTriView)
-
-
-
Field Detail
-
logger
private static final com.chrisnewland.freelogj.Logger logger
-
logListener
private ILogListener logListener
-
sandboxStage
private ISandboxStage sandboxStage
-
SANDBOX_DIR
public static final java.nio.file.Path SANDBOX_DIR
-
SANDBOX_SOURCE_DIR
public static final java.nio.file.Path SANDBOX_SOURCE_DIR
-
SANDBOX_CLASS_DIR
public static final java.nio.file.Path SANDBOX_CLASS_DIR
-
PATH_STD_ERR
public static final java.nio.file.Path PATH_STD_ERR
-
PATH_STD_OUT
public static final java.nio.file.Path PATH_STD_OUT
-
SANDBOX_LOGFILE
private static final java.lang.String SANDBOX_LOGFILE
- See Also:
- Constant Field Values
-
sandboxLogFile
private java.io.File sandboxLogFile
-
logParser
private ILogParser logParser
-
languageManager
private LanguageManager languageManager
-
lastProcess
private IExternalProcess lastProcess
-
-
Constructor Detail
-
Sandbox
public Sandbox(ILogParser parser, ILogListener logger, ISandboxStage sandboxStage)
-
-
Method Detail
-
initialise
private static void initialise()
-
reset
public void reset()
-
copyExamples
private static void copyExamples()
-
runSandbox
public void runSandbox(java.lang.String language, java.util.List<java.io.File> compileList, java.io.File fileToRun) throws java.lang.Exception- Throws:
java.lang.Exception
-
getLastProcess
public IExternalProcess getLastProcess()
-
buildUniqueClasspath
private java.util.List<java.lang.String> buildUniqueClasspath(JITWatchConfig config)
-
executeClass
private boolean executeClass(java.lang.String fqClassName, IRuntime runtime, boolean intelMode) throws java.lang.Exception- Throws:
java.lang.Exception
-
runJITWatch
private void runJITWatch() throws java.io.IOException- Throws:
java.io.IOException
-
showTriView
private void showTriView(java.lang.String language, java.lang.String openClassInTriView)
-
getMemberForClass
private IMetaMember getMemberForClass(java.lang.String openClassInTriView, IReadOnlyJITDataModel model)
-
-