All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ibm.wala.shrike.sourcepos.InvalidRangeException Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2002 - 2014 IBM Corporation.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 */

/*
 * InvalidRangeException.java
 *
 * Created on 21. Juni 2005, 13:36
 */

package com.ibm.wala.shrike.sourcepos;

/**
 * An exception for invalid ranges.
 *
 * @author Siegfried Weber
 * @author Juergen Graf <[email protected]>
 */
class InvalidRangeException extends Exception {

  private static final long serialVersionUID = 3534258510796557967L;

  /** possible causes for this exception */
  enum Cause {
    END_BEFORE_START,
    START_UNDEFINED,
    END_UNDEFINED
  }

  /** the cause for this exception */
  private final Cause cause;

  /**
   * Constructs an instance of {@code InvalidRangeException} with the specified cause.
   *
   * @param c the cause
   */
  InvalidRangeException(Cause c) {
    cause = c;
  }

  /**
   * Returns the cause for this exception.
   *
   * @return the cause for this exception
   */
  Cause getThisCause() {
    return cause;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy