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


Java TaskContainer类代码示例

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


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

示例1: addTaskToTarget

import org.apache.tools.ant.TaskContainer; //导入依赖的package包/类
private void addTaskToTarget( Target target, Task task ) {
   UnknownElement replacement = new UnknownElement( taskType );  // shouldn't do taskType, for Ant 1.6 and later there is a getTaskType method
   replacement.setProject( getProject() );
   invokeMethod( replacement, "setTaskType", taskType );
   replacement.setTaskName( task.getTaskName() );
   replacement.setLocation( task.getLocation() );
   replacement.setOwningTarget( target );
   replacement.setRuntimeConfigurableWrapper( task.getRuntimeConfigurableWrapper() );
   invokeMethod( task.getRuntimeConfigurableWrapper(), "setProxy", replacement );
   replacement.maybeConfigure();
   log("replacement is a " + replacement.getTaskName() + ", " + replacement.getClass().getName());
   if (replacement instanceof TaskContainer) {
      log("replacement is a TaskContainer");
      invokeMethod(replacement, "handleChildren", new Object[]{this, this.getRuntimeConfigurableWrapper()});
   }
   target.addTask(replacement);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:18,代码来源:ForTask.java

示例2: TaskHandler

import org.apache.tools.ant.TaskContainer; //导入依赖的package包/类
/**
 * Constructor.
 *
 * @param parentHandler The handler which should be restored to the
 *                      parser at the end of the element.
 *                      Must not be <code>null</code>.
 *
 * @param container     Container for the element.
 *                      Must not be <code>null</code>.
 *
 * @param parentWrapper Wrapper for the parent element, if any.
 *                      May be <code>null</code>.
 *
 * @param target        Target this element is part of.
 *                      Must not be <code>null</code>.
 */
public TaskHandler(ProjectHelperImpl helperImpl, DocumentHandler parentHandler,
                   TaskContainer container,
                   RuntimeConfigurable parentWrapper, Target target) {
    super(helperImpl, parentHandler);
    this.container = container;
    this.parentWrapper = parentWrapper;
    this.target = target;
}
 
开发者ID:apache,项目名称:ant,代码行数:25,代码来源:ProjectHelperImpl.java

示例3: startElement

import org.apache.tools.ant.TaskContainer; //导入依赖的package包/类
/**
 * Handles the start of an element within a target. Task containers
 * will always use another task handler, and all other tasks
 * will always use a nested element handler.
 *
 * @param name The name of the element being started.
 *            Will not be <code>null</code>.
 * @param attrs Attributes of the element being started.
 *              Will not be <code>null</code>.
 *
 * @exception SAXParseException if an error occurs when initialising
 *                              the appropriate child handler
 */
public void startElement(String name, AttributeList attrs) throws SAXParseException {
    if (task instanceof TaskContainer) {
        // task can contain other tasks - no other nested elements possible
        new TaskHandler(helperImpl, this, (TaskContainer) task, wrapper, target).init(name,
                attrs);
    } else {
        new NestedElementHandler(helperImpl, this, task, wrapper, target).init(name, attrs);
    }
}
 
开发者ID:apache,项目名称:ant,代码行数:23,代码来源:ProjectHelperImpl.java


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