gausssoft.lang
Class ImplementationError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--gausssoft.lang.ImplementationError
All Implemented Interfaces:
Serializable

public class ImplementationError
extends Error

This class is thrown to indicate a class has been programmed incorrectly, and is not safe to be used. This means that the class is not safe to be used, and should be fixed.

At construction time, you must supply the ImplementationError the object which is throwing the ImplementationError, or the class which is incorrectly programmed. You can also supply debug information at construction time, in the form of a String.

Author:
Allan Crooks
See Also:
Serialized Form

Constructor Summary
ImplementationError(Class clazz)
          Creates a new ImplementationError, specifying the class which is incorrectly programmed.
ImplementationError(Class clazz, String debug)
          Creates a new ImplementationError, specifying the class which is incorrectly programmed and debug information.
ImplementationError(Object obj)
          Creates a new ImplementationError, specifying the object which threw this error.
ImplementationError(Object obj, String debug)
          Creates a new ImplementationError, specifying the object which threw this error and debug information.
 
Method Summary
 String getDebugInfo()
          Returns a string containing debug information.
 Class getErrorClass()
          Returns the class which caused an error.
 String getMessage()
          Returns information in the form of: ClassName - DebugInfo (or ClassName if no debug information exists).
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImplementationError

public ImplementationError(Object obj)
Creates a new ImplementationError, specifying the object which threw this error. The class of the object supplied will be used.

An empty string will be used as the debug information.

Parameters:
obj - The object which created this ImplementationError.
Throws:
NullPointerException - If obj is null.

ImplementationError

public ImplementationError(Class clazz)
Creates a new ImplementationError, specifying the class which is incorrectly programmed.

An empty string will be used as the debug information.

Parameters:
clazz - The class which is incorrectly programmed.
Throws:
NullPointerException - If clazz is null.

ImplementationError

public ImplementationError(Object obj,
                           String debug)
Creates a new ImplementationError, specifying the object which threw this error and debug information. The class of the object supplied will be used.
Parameters:
obj - The object which created this ImplementationError.
debug - A string containing debug information.
Throws:
NullPointerException - If obj or debug is null.

ImplementationError

public ImplementationError(Class clazz,
                           String debug)
Creates a new ImplementationError, specifying the class which is incorrectly programmed and debug information.
Parameters:
clazz - The class which is incorrectly programmed.
debug - A string containing debug information.
Throws:
NullPointerException - If clazz or debug is null.
Method Detail

getErrorClass

public final Class getErrorClass()
Returns the class which caused an error.
Returns:
The class which caused an error.

getDebugInfo

public final String getDebugInfo()
Returns a string containing debug information. If none was specified at construction time, an empty string will be returned.
Returns:
A string containing debug information.

getMessage

public String getMessage()
Returns information in the form of: ClassName - DebugInfo (or ClassName if no debug information exists).
Overrides:
getMessage in class Throwable
Returns:
A string containing information about this object.