Java源码示例:com.twosigma.beakerx.DefaultJVMVariables

示例1
private void initClasspath(Map<String, Object> params) {
  Collection<String> listOfClassPath = (Collection<String>) params.get(DefaultJVMVariables.CLASSPATH);
  if (listOfClassPath != null) {
    for (String line : listOfClassPath) {
      if (!line.trim().isEmpty()) {
        classPath.add(new PathToJar(line));
      }
    }
  }
}
 
示例2
private void initImports(Map<String, Object> params) {
  Collection<String> listOfImports = (Collection<String>) params.get(DefaultJVMVariables.IMPORTS);
  List<ImportPath> importPaths = new ArrayList<>();
  if (listOfImports != null) {
    for (String line : listOfImports) {
      if (!line.trim().isEmpty()) {
        importPaths.add(new ImportPath(line));
      }
    }
    if (this.imports != null) {
      importPaths.addAll(this.imports.getImportPaths());
    }
  }
  this.imports = new Imports(importPaths);
}
 
示例3
static EvaluatorParameters getKernelParameters(BeakerXSystem beakerXSystem) {
  Map<String, Object> kernelParameters = new HashMap<>();
  kernelParameters.put(IMPORTS, new DefaultJVMVariables().getImports());
  kernelParameters = getDefaultConnectionString(beakerXSystem, kernelParameters);
  return new EvaluatorParameters(kernelParameters);
}