当前位置: 首页>>代码示例>>Java>>正文


Java InputHandler类代码示例

本文整理汇总了Java中org.apache.tools.ant.input.InputHandler的典型用法代码示例。如果您正苦于以下问题:Java InputHandler类的具体用法?Java InputHandler怎么用?Java InputHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


InputHandler类属于org.apache.tools.ant.input包,在下文中一共展示了InputHandler类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getInputHandler

import org.apache.tools.ant.input.InputHandler; //导入依赖的package包/类
private InputHandler getInputHandler() {
    if (type != null) {
       return type.getInputHandler();
    }
    if (refid != null) {
       try {
           return (InputHandler) (getProject().getReference(refid));
       } catch (final ClassCastException e) {
           throw new BuildException(
               refid + " does not denote an InputHandler", e);
       }
    }
    if (classname != null) {
       return ClasspathUtils.newInstance(classname,
           createLoader(), InputHandler.class);
    }
    throw new BuildException(
        "Must specify refid, classname or type");
}
 
开发者ID:apache,项目名称:ant,代码行数:20,代码来源:Input.java

示例2: prompt

import org.apache.tools.ant.input.InputHandler; //导入依赖的package包/类
public void prompt(String message) {
	InputRequest ir = new InputRequest("Debugger> ");
	InputHandler ih = new DefaultInputHandler();
	String command = null;
	project.log(StringUtils.LINE_SEP
			+ "-------- Ant Command Line Debugger --------"
			+ StringUtils.LINE_SEP + StringUtils.LINE_SEP);

	// print a friendly message to allow the user to understand why this
	// breakpoint occurred
	project.log(message);
	project.log("");
	// keep accepting inputs, until the user enters the return command
	do {
		ih.handleInput(ir);
		command = ir.getInput();
		commandHandler.handleCommand(command);
		project.log(""); // log a new line
	} while (!"return".equals(command));

	// resume build execution on this
	project.log(StringUtils.LINE_SEP
			+ "--------- Resuming Ant Execution ----------"
			+ StringUtils.LINE_SEP);
}
 
开发者ID:apache,项目名称:ant-easyant-tasks,代码行数:26,代码来源:DebugPrompt.java

示例3: testInputHandler

import org.apache.tools.ant.input.InputHandler; //导入依赖的package包/类
@Test
public void testInputHandler() {
    InputHandler ih = p.getInputHandler();
    assertNotNull(ih);
    assertTrue(ih instanceof DefaultInputHandler);
    InputHandler pfih = new PropertyFileInputHandler();
    p.setInputHandler(pfih);
    assertSame(pfih, p.getInputHandler());
}
 
开发者ID:apache,项目名称:ant,代码行数:10,代码来源:ProjectTest.java

示例4: testInputHandlerInheritance

import org.apache.tools.ant.input.InputHandler; //导入依赖的package包/类
@Test
public void testInputHandlerInheritance() {
    InputHandler ih = new PropertyFileInputHandler();
    buildRule.getProject().setInputHandler(ih);
    InputHandlerChecker ic = new InputHandlerChecker(ih);
    buildRule.getProject().addBuildListener(ic);
    buildRule.executeTarget("tripleCall");
    AssertionFailedError ae = ic.getError();
    if (ae != null) {
        throw ae;
    }
    buildRule.getProject().removeBuildListener(ic);
}
 
开发者ID:apache,项目名称:ant,代码行数:14,代码来源:AntTest.java

示例5: getInputHandler

import org.apache.tools.ant.input.InputHandler; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
@NotNull
public InputHandler getInputHandler()
{
    return getInputHandler(getProject());
}
 
开发者ID:rydnr,项目名称:queryj,代码行数:10,代码来源:AntProjectAdapter.java

示例6: getInputHandler

import org.apache.tools.ant.input.InputHandler; //导入依赖的package包/类
public InputHandler getInputHandler() {
	return delegate.getInputHandler();
}
 
开发者ID:cniweb,项目名称:ant-contrib,代码行数:4,代码来源:ProjectDelegate.java

示例7: setInputHandler

import org.apache.tools.ant.input.InputHandler; //导入依赖的package包/类
public void setInputHandler(InputHandler arg0) {
	delegate.setInputHandler(arg0);
}
 
开发者ID:cniweb,项目名称:ant-contrib,代码行数:4,代码来源:ProjectDelegate.java

示例8: InputHandlerChecker

import org.apache.tools.ant.input.InputHandler; //导入依赖的package包/类
InputHandlerChecker(InputHandler value) {
    ih = value;
}
 
开发者ID:apache,项目名称:ant,代码行数:4,代码来源:AntTest.java

示例9: setInputHandler

import org.apache.tools.ant.input.InputHandler; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void setInputHandler(@NotNull final InputHandler handler)
{
    setInputHandler(handler, getProject());
}
 
开发者ID:rydnr,项目名称:queryj,代码行数:9,代码来源:AntProjectAdapter.java

示例10: setInputHandler

import org.apache.tools.ant.input.InputHandler; //导入依赖的package包/类
/**
 * Set the input handler.
 *
 * @param handler the InputHandler instance to use for gathering input.
 */
public void setInputHandler(final InputHandler handler) {
    inputHandler = handler;
}
 
开发者ID:apache,项目名称:ant,代码行数:9,代码来源:Project.java

示例11: getInputHandler

import org.apache.tools.ant.input.InputHandler; //导入依赖的package包/类
/**
 * Retrieve the current input handler.
 *
 * @return the InputHandler instance currently in place for the project
 *         instance.
 */
public InputHandler getInputHandler() {
    return inputHandler;
}
 
开发者ID:apache,项目名称:ant,代码行数:10,代码来源:Project.java


注:本文中的org.apache.tools.ant.input.InputHandler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。