emptyattributeexception.java

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

JAVA
58
字号
package org.momeunit.ant.taskdefs;import org.apache.tools.ant.BuildException;/** * Exception that signals attempt to assign the empty string to an attribute. *  * @author Sergio Morozov * @version 1.1.2 */public class EmptyAttributeException extends BuildException{  private static final long serialVersionUID = -5379086963126544802L;  private String attribute;  private String element;  /**   * Instantiates EmptyAttributeException with given attribute and element.   *    * @param attribute   *          name of empty attribute.   * @param element   *          name of element containing empty element.   * @since 1.1   */  public EmptyAttributeException(String attribute, String element)  {    super((attribute != null ? attribute : "unknown") + " attribute of <"        + (element != null ? element : "unknown") + "> can't be empty.");    this.attribute = attribute;    this.element = element;  }  /**   * Returns name of offending attribute.   *    * @return name of offending attribute.   * @since 1.1   */  public String getAttribute()  {    return this.attribute;  }  /**   * Returns name of element containing offending attribute.   *    * @return name of element containing offending attribute.   * @since 1.1   */  public String getElement()  {    return this.element;  }}

⌨️ 快捷键说明

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