edu.rice.cs.cunit.threadCheck.predicates
Class NotThreadCheckPredicates

java.lang.Object
  extended by edu.rice.cs.cunit.threadCheck.predicates.NotThreadCheckPredicates

public class NotThreadCheckPredicates
extends java.lang.Object

Class containing several common predicates used by the @Not* annotations.

Author:
Mathias Ricken

Constructor Summary
NotThreadCheckPredicates()
           
 
Method Summary
static boolean checkEventThread(java.lang.Object thisObject)
          Return false if the current thread is the event thread.
static boolean checkGroup(java.lang.Object thisObject, java.lang.String value, boolean regex)
          Return false if the current thread's group equals the specified string
static boolean checkName(java.lang.Object thisObject, java.lang.String value, boolean regex)
          Return false if the current thread's name equals the specified string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotThreadCheckPredicates

public NotThreadCheckPredicates()
Method Detail

checkEventThread

public static boolean checkEventThread(java.lang.Object thisObject)
Return false if the current thread is the event thread.

Parameters:
thisObject - "this" at the time of the check, or null if not available; ignored by this method
Returns:
false if the current thread is the event thread

checkName

public static boolean checkName(java.lang.Object thisObject,
                                java.lang.String value,
                                boolean regex)
Return false if the current thread's name equals the specified string

Parameters:
thisObject - "this" at the time of the check, or null if not available; ignored by this method
value - string to compare the current thread's name to
regex - true if value should be treated as a regular expression
Returns:
false if the current thread's name equals the specified string

checkGroup

public static boolean checkGroup(java.lang.Object thisObject,
                                 java.lang.String value,
                                 boolean regex)
Return false if the current thread's group equals the specified string

Parameters:
thisObject - "this" at the time of the check, or null if not available; ignored by this method
value - string to compare the current thread's group to
regex - true if value should be treated as a regular expression
Returns:
false if the current thread's group equals the specified string