edu.rice.cs.cunit.concJUnit
Class CreationContextError

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Error
          extended by edu.rice.cs.cunit.concJUnit.MultithreadedTestError
              extended by edu.rice.cs.cunit.concJUnit.CreationContextError
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
LuckyError, NoJoinError

public abstract class CreationContextError
extends MultithreadedTestError

Class representing a conceptual error of a multithreaded test that has information about the creation context of a thread.

See Also:
Serialized Form

Constructor Summary
CreationContextError(String message)
          Constructs a new test error with the specified detail message and no creation context.
CreationContextError(String message, StackTraceElement[] stes)
          Constructs a new multithreaded test error with the specified detail message and creation context.
CreationContextError(String message, String cc)
          Constructs a new multithreaded test error with the specified detail message and creation context.
 
Method Summary
 StackTraceElement[] getCreationContext()
          Returns the creation context.
static StackTraceElement[] parseCreationContextString(String cc)
          Parse a creation context string.
 
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CreationContextError

public CreationContextError(String message)
Constructs a new test error with the specified detail message and no creation context.

Parameters:
message - the detail message

CreationContextError

public CreationContextError(String message,
                            StackTraceElement[] stes)
Constructs a new multithreaded test error with the specified detail message and creation context.

Parameters:
message - the detail message
stes - array of stack trace elements, describing where the thread was started

CreationContextError

public CreationContextError(String message,
                            String cc)
Constructs a new multithreaded test error with the specified detail message and creation context.

Parameters:
message - the detail message
cc - string with creation context, describing where the thread was started
Method Detail

getCreationContext

public StackTraceElement[] getCreationContext()
Returns the creation context.

Returns:
array of stack trace elements, describing where the thread was started

parseCreationContextString

public static StackTraceElement[] parseCreationContextString(String cc)
Parse a creation context string.

Parameters:
cc - creation context string (looks like a stack trace printed out).
Returns:
array of stack trace elements, describing where the thread was started