org.apache.tools.ant.Project.setInputHandler()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(107)

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

Project.setInputHandler介绍

[英]Set the input handler.
[中]设置输入处理程序。

代码示例

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

/**
 * Creates the InputHandler and adds it to the project.
 *
 * @param project the project instance.
 *
 * @exception BuildException if a specified InputHandler
 *                           implementation could not be loaded.
 */
private void addInputHandler(final Project project) throws BuildException {
  InputHandler handler = null;
  if (inputHandlerClassname == null) {
    handler = new DefaultInputHandler();
  } else {
    handler = ClasspathUtils.newInstance(
        inputHandlerClassname, Main.class.getClassLoader(),
        InputHandler.class);
    project.setProjectReference(handler);
  }
  project.setInputHandler(handler);
}

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

newProject.setInputHandler(getProject().getInputHandler());

代码示例来源:origin: dita-ot/dita-ot

/**
 * Creates the InputHandler and adds it to the project.
 *
 * @param project the project instance.
 *
 * @exception BuildException if a specified InputHandler implementation
 *                could not be loaded.
 */
private void addInputHandler(final Project project) throws BuildException {
  InputHandler handler;
  if (inputHandlerClassname == null) {
    handler = new DefaultInputHandler();
  } else {
    handler = ClasspathUtils.newInstance(inputHandlerClassname, Main.class.getClassLoader(),
        InputHandler.class);
    project.setProjectReference(handler);
  }
  project.setInputHandler(handler);
}

代码示例来源:origin: org.codehaus.izpack/izpack-event

try
  antProj.setInputHandler(new AntActionInputHandler());
  antProj.setName("antcallproject");
  if (verbose)

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

public AntBuilder(final Project project, final Target owningTarget) {
  this.project = project;
  this.project.setInputHandler(new DefaultInputHandler());
  collectorTarget = owningTarget;
  antXmlContext = new AntXMLContext(project);
  collectorTarget.setProject(project);
  antXmlContext.setCurrentTarget(collectorTarget);
  antXmlContext.setLocator(new AntBuilderLocator());
  antXmlContext.setCurrentTargets(new HashMap());
  
  implicitTarget = new Target();
  implicitTarget.setProject(project);
  implicitTarget.setName("");
  antXmlContext.setImplicitTarget(implicitTarget);
  // FileScanner is a Groovy hack (utility?)
  project.addDataTypeDefinition("fileScanner", FileScanner.class);
}

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

public AntBuilder(final Project project, final Target owningTarget) {
  this.project = project;
  this.project.setInputHandler(new DefaultInputHandler());
  collectorTarget = owningTarget;
  antXmlContext = new AntXMLContext(project);
  collectorTarget.setProject(project);
  antXmlContext.setCurrentTarget(collectorTarget);
  antXmlContext.setLocator(new AntBuilderLocator());
  antXmlContext.setCurrentTargets(new HashMap());
  
  implicitTarget = new Target();
  implicitTarget.setProject(project);
  implicitTarget.setName("");
  antXmlContext.setImplicitTarget(implicitTarget);
  // FileScanner is a Groovy hack (utility?)
  project.addDataTypeDefinition("fileScanner", FileScanner.class);
}

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

public AntBuilder(final Project project, final Target owningTarget) {
  this.project = project;
  this.project.setInputHandler(new DefaultInputHandler());
  collectorTarget = owningTarget;
  antXmlContext = new AntXMLContext(project);
  collectorTarget.setProject(project);
  antXmlContext.setCurrentTarget(collectorTarget);
  antXmlContext.setLocator(new AntBuilderLocator());
  antXmlContext.setCurrentTargets(new HashMap());
  
  implicitTarget = new Target();
  implicitTarget.setProject(project);
  implicitTarget.setName("");
  antXmlContext.setImplicitTarget(implicitTarget);
  // FileScanner is a Groovy hack (utility?)
  project.addDataTypeDefinition("fileScanner", FileScanner.class);
}

相关文章