libjar.java

来自「MoMEUnit是一个单元测试的J2ME的应用程序xUnit架构实例。这是来自J」· Java 代码 · 共 59 行

JAVA
59
字号
package org.momeunit.ant.taskdefs;import org.apache.tools.ant.Task;import org.apache.tools.ant.types.ZipFileSet;/** * MoMEUnit nested tag intended to specify files of external library to be * included in resulting test J2ME application. Extends {@link ZipFileSet}. * Adds if/unless functionality. *  * @author Sergio Morozov * @version 1.1.2 */public class LibJar extends ZipFileSet{  private String ifProp = null;  private String unlessProp = null;  /**   * Sets <code>if</code> attribute.   *    * @param ifProp   *          the <code>if</code> attribute to set.   * @since 1.1   */  public void setIf(String ifProp)  {    this.ifProp = ifProp;  }  /**   * Sets <code>unless</code> attribute.   *    * @param unlessProp   *          the <code>unless</code> attribute to set.   * @since 1.1   */  public void setUnless(String unlessProp)  {    this.unlessProp = unlessProp;  }  /**   * Is this tag allowed to use.   *    * @param task   *          owning task   * @return <code>true</code> if this tag is allowed to use,   *         <code>false</code> otherwise.   * @since 1.1   */  public boolean shouldUse(Task task)  {    return (ifProp == null || task.getProject().getProperty(ifProp) != null)        && (unlessProp == null || task.getProject().getProperty(unlessProp) == null);  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?