Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.lang
Class AssertionError  view AssertionError download AssertionError.java

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Error
          extended byjava.lang.AssertionError
All Implemented Interfaces:
java.io.Serializable

public class AssertionError
extends Error

An assertion error normally occurs as a result of the assert statement added in JDK 1.4, to indicate that an assertion failed. There are enough constructors to ensure that new AssertionError(expression) will work for all expressions, regardless of type, as if the error message were given by the string "" + expression. This extends Error, because you usually do not want to inadvertently trap an assertion failure.

Since:
1.4

Nested Class Summary
 
Nested classes inherited from class java.lang.Throwable
 
Field Summary
private static long serialVersionUID
          Compatible with JDK 1.4+.
 
Fields inherited from class java.lang.Throwable
 
Constructor Summary
AssertionError()
          Construct an AssertionError with no detail message.
AssertionError(boolean msg)
          Construct an AssertionError with the string conversion of the given boolean as its error message.
AssertionError(char msg)
          Construct an AssertionError with the string conversion of the given char as its error message.
AssertionError(double msg)
          Construct an AssertionError with the string conversion of the given double as its error message.
AssertionError(float msg)
          Construct an AssertionError with the string conversion of the given float as its error message.
AssertionError(int msg)
          Construct an AssertionError with the string conversion of the given int as its error message.
AssertionError(long msg)
          Construct an AssertionError with the string conversion of the given long as its error message.
AssertionError(Object msg)
          Construct an AssertionError with the string conversion of the given object as its error message.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Compatible with JDK 1.4+.

See Also:
Constant Field Values
Constructor Detail

AssertionError

public AssertionError()
Construct an AssertionError with no detail message.


AssertionError

public AssertionError(Object msg)
Construct an AssertionError with the string conversion of the given object as its error message. If the object is a Throwable, it is also set as the cause of this error.


AssertionError

public AssertionError(boolean msg)
Construct an AssertionError with the string conversion of the given boolean as its error message.


AssertionError

public AssertionError(char msg)
Construct an AssertionError with the string conversion of the given char as its error message.


AssertionError

public AssertionError(int msg)
Construct an AssertionError with the string conversion of the given int as its error message.


AssertionError

public AssertionError(long msg)
Construct an AssertionError with the string conversion of the given long as its error message.


AssertionError

public AssertionError(float msg)
Construct an AssertionError with the string conversion of the given float as its error message.


AssertionError

public AssertionError(double msg)
Construct an AssertionError with the string conversion of the given double as its error message.