package umontreal.iro.lecuyer.util;
/**
* This exception is thrown by a {@link ClassFinder}
* when two or more fully qualified class names can be
* associated with a simple class name.
*
*/
public class NameConflictException extends Exception {
private static final long serialVersionUID = -5124156035520217708L;
private ClassFinder finder;
private String name;
/**
* Constructs a new name conflict exception.
*
*/
public NameConflictException() {}
/**
* Constructs a new name conflict exception with
* message message.
*
* @param message the error message.
*
*
*/
public NameConflictException (String message) {
super (message);
}
/**
* Constructs a new name conflict exception with class
* finder finder, simple name name,
* and message message.
*
* @param finder the class finder in which the name conflict occurred.
*
* @param name the simple conflicting name.
*
* @param message the message describint the conflict.
*
*/
public NameConflictException (ClassFinder finder, String name,
String message) {
super (message);
this.finder = finder;
this.name = name;
}
/**
* Returns the class finder associated with
* this exception.
*
* @return the associated class finder.
*
*/
public ClassFinder getClassFinder() {
return finder;
}
/**
* Returns the simple name associated with
* this exception.
*
* @return the associated simple name.
*/
public String getName() {
return name;
}
}
Ads help maintain this website.