org.apache.tools.ant.taskdefs.Java.clearArgs()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(119)

本文整理了Java中org.apache.tools.ant.taskdefs.Java.clearArgs()方法的一些代码示例,展示了Java.clearArgs()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Java.clearArgs()方法的具体详情如下:
包路径:org.apache.tools.ant.taskdefs.Java
类名称:Java
方法名:clearArgs

Java.clearArgs介绍

[英]Clear out the arguments to this java task.
[中]清除此java任务的参数。

代码示例

代码示例来源:origin: apache/groovy

private void createNewArgs(String txt) throws IOException {
  final String[] args = cmdline.getCommandline();
  // Temporary file - delete on exit, create (assured unique name).
  final File tempFile = FileUtils.getFileUtils().createTempFile(PREFIX, SUFFIX, null, true, true);
  final String[] commandline = new String[args.length + 1];
  ResourceGroovyMethods.write(tempFile, txt);
  commandline[0] = tempFile.getCanonicalPath();
  System.arraycopy(args, 0, commandline, 1, args.length);
  super.clearArgs();
  for (String arg : commandline) {
    final Commandline.Argument argument = super.createArg();
    argument.setValue(arg);
  }
}

代码示例来源:origin: org.apache.ant/ant

helperTask.clearArgs();

代码示例来源:origin: org.ow2.jonas/bootstrap-ant

/**
 * {@inheritDoc}
 */
public void configureJava(final Java task) {
  task.clearArgs();
  task.setClassname(ADMIN_CLASS);
  task.createArg().setValue("-start");
}

代码示例来源:origin: org.codehaus.groovy/groovy-all-minimal

private void createNewArgs(String txt) throws IOException {
  final String[] args = cmdline.getCommandline();
  final File tempFile = FileUtils.getFileUtils().createTempFile(PREFIX, SUFFIX, null, true);
  final String[] commandline = new String[args.length + 1];
  DefaultGroovyMethods.write(tempFile, txt);
  commandline[0] = tempFile.getCanonicalPath();
  System.arraycopy(args, 0, commandline, 1, args.length);
  super.clearArgs();
  for (int i = 0; i < commandline.length; i++) {
    final Commandline.Argument argument = super.createArg();
    argument.setValue(commandline[i]);
  }
}

代码示例来源:origin: org.codehaus.groovy/groovy-jdk14

private void createNewArgs(String txt) throws IOException {
  final String[] args = cmdline.getCommandline();
  // Temporary file - delete on exit, create (assured unique name).
  final File tempFile = FileUtils.getFileUtils().createTempFile(PREFIX, SUFFIX, null, true, true);
  final String[] commandline = new String[args.length + 1];
  DefaultGroovyMethods.write(tempFile, txt);
  commandline[0] = tempFile.getCanonicalPath();
  System.arraycopy(args, 0, commandline, 1, args.length);
  super.clearArgs();
  for (String arg : commandline) {
    final Commandline.Argument argument = super.createArg();
    argument.setValue(arg);
  }
}

代码示例来源:origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

private void createNewArgs(String txt) throws IOException {
  final String[] args = cmdline.getCommandline();
  // Temporary file - delete on exit, create (assured unique name).
  final File tempFile = FileUtils.getFileUtils().createTempFile(PREFIX, SUFFIX, null, true, true);
  final String[] commandline = new String[args.length + 1];
  DefaultGroovyMethods.write(tempFile, txt);
  commandline[0] = tempFile.getCanonicalPath();
  System.arraycopy(args, 0, commandline, 1, args.length);
  super.clearArgs();
  for (String arg : commandline) {
    final Commandline.Argument argument = super.createArg();
    argument.setValue(arg);
  }
}

代码示例来源:origin: org.kohsuke.droovy/groovy

private void createNewArgs(String txt) throws IOException {
  final String[] args = cmdline.getCommandline();
  // Temporary file - delete on exit, create (assured unique name).
  final File tempFile = FileUtils.getFileUtils().createTempFile(PREFIX, SUFFIX, null, true, true);
  final String[] commandline = new String[args.length + 1];
  DefaultGroovyMethods.write(tempFile, txt);
  commandline[0] = tempFile.getCanonicalPath();
  System.arraycopy(args, 0, commandline, 1, args.length);
  super.clearArgs();
  for (int i = 0; i < commandline.length; i++) {
    final Commandline.Argument argument = super.createArg();
    argument.setValue(commandline[i]);
  }
}

代码示例来源:origin: org.codehaus.groovy/groovy-ant

private void createNewArgs(String txt) throws IOException {
  final String[] args = cmdline.getCommandline();
  // Temporary file - delete on exit, create (assured unique name).
  final File tempFile = FileUtils.getFileUtils().createTempFile(PREFIX, SUFFIX, null, true, true);
  final String[] commandline = new String[args.length + 1];
  ResourceGroovyMethods.write(tempFile, txt);
  commandline[0] = tempFile.getCanonicalPath();
  System.arraycopy(args, 0, commandline, 1, args.length);
  super.clearArgs();
  for (String arg : commandline) {
    final Commandline.Argument argument = super.createArg();
    argument.setValue(arg);
  }
}

代码示例来源:origin: nekohtml/nekodtd

/** Convert a DTD to its XML representation. */
private void convertFile(File fromFile, File toFile) {
  toFile.getParentFile().mkdirs();
  setClassname("xni.Writer");
  //setLogError(true);
  try {
    Class cls = getClass();
    Method method = cls.getMethod("setLogError", new Class[]{boolean.class});
    method.invoke(this, new Object[]{Boolean.TRUE});
  }
  catch (Exception e) {
    // older version of Ant, so ignore
  }
  createArg().setLine("-p");
  createArg().setLine("org.cyberneko.dtd.DTDConfiguration");
  createArg().setLine(fromFile.getPath());
  setOutput(toFile);
  setFork(true); // if we don't do this, the output stream isn't reset
  super.execute();
  clearArgs();
}

代码示例来源:origin: net.sf.jt400/jt400

java.clearArgs();
java.setClassname("com.ibm.as400.data.ProgramCallDocument");
java.setClasspath(classpath_);

代码示例来源:origin: andrena/macker

getJvm().setFork(fork);
getJvm().setFailonerror(false);
getJvm().clearArgs();

相关文章