|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.cunit.threadCheck.subAnnot.Predicates
public class Predicates
Class containing several common predicates.
| Constructor Summary | |
|---|---|
Predicates()
|
|
| Method Summary | |
|---|---|
static boolean |
checkAnd(java.lang.Object thisObject,
java.lang.Object[] methodArgs,
InvariantAnnotation[] value)
Return false if one or more of the annotations in the array returned false. |
static boolean |
checkDistinctArguments(java.lang.Object thisObject,
java.lang.Object[] args,
int[] value)
Return true if the object with the specified indices are all distinct. |
static boolean |
checkEventThread(java.lang.Object thisObject)
Return true if the current thread is the event thread. |
static boolean |
checkEventThreadAfterRealized(java.lang.Object thisObject)
Return true if the current thread is the event thread, or if thisObject is an instance of a subclass of java.awt.Component and that component has not been realized yet. |
static boolean |
checkGroup(java.lang.Object thisObject,
java.lang.String value,
boolean regex)
Return true if the current thread's group equals the specified string |
static boolean |
checkImplies(java.lang.Object thisObject,
java.lang.Object[] methodArgs,
InvariantAnnotation[] value)
Return true if A -> B is true, where A is the first annotation and B is the second. |
static boolean |
checkMonitorOwned(java.lang.Object o)
Return true if the any thread owns the monitor of the object. |
static boolean |
checkName(java.lang.Object thisObject,
java.lang.String value,
boolean regex)
Return true if the current thread's name equals the specified string |
static boolean |
checkNot(java.lang.Object thisObject,
java.lang.Object[] methodArgs,
InvariantAnnotation value)
Return true if the annotations in the array returned false, and vice versa. |
static boolean |
checkNullArgument(java.lang.Object thisObject,
java.lang.Object[] args,
int value)
Return true if the object with index value in the array of method arguments is null. |
static boolean |
checkNumberBoundedArgument(java.lang.Object thisObject,
java.lang.Object[] args,
NumberBoundedArgument.Mode mode,
int index,
double bound,
double upperBound)
Return true if the object with the specified index is a Number and meeds the bounds. |
static boolean |
checkOr(java.lang.Object thisObject,
java.lang.Object[] methodArgs,
InvariantAnnotation[] value)
Return true if one or more of the annotations in the array returned true. |
static boolean |
checkSameArguments(java.lang.Object thisObject,
java.lang.Object[] args,
int[] value)
Return true if the object with the specified indices are all the same. |
static boolean |
checkSynchronizedArgument(java.lang.Object thisObject,
java.lang.Object[] args,
int value)
Return true if the any thread owns the monitor of the object with index value in the array of method arguments |
static boolean |
checkSynchronizedField(java.lang.Object thisObject,
java.lang.Class fieldClass,
java.lang.String fieldName)
Return true if the any thread owns the monitor of the specified field. |
static boolean |
checkSynchronizedFieldByName(java.lang.Object thisObject,
java.lang.String fieldClassName,
java.lang.String fieldName)
Return true if any thread owns the monitor of the specified field. |
static boolean |
checkThread(java.lang.Object thisObject,
java.lang.Class fieldClass,
java.lang.String fieldName)
Return true if the current thread is equal to the thread in the specified field. |
static boolean |
checkThreadByName(java.lang.Object thisObject,
java.lang.String fieldClassName,
java.lang.String fieldName)
Return true if the current thread is equal to the thread in the specified field. |
static boolean |
checkXOr(java.lang.Object thisObject,
java.lang.Object[] methodArgs,
InvariantAnnotation[] value)
Return true if exactly one of the annotations in the array returned true. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Predicates()
| Method Detail |
|---|
public static boolean checkOr(java.lang.Object thisObject,
java.lang.Object[] methodArgs,
InvariantAnnotation[] value)
thisObject - "this" at the time of the check, or null if not available; ignored by this methodmethodArgs - array with method argumentsvalue - array of invariant annotations
public static boolean checkAnd(java.lang.Object thisObject,
java.lang.Object[] methodArgs,
InvariantAnnotation[] value)
thisObject - "this" at the time of the check, or null if not available; ignored by this methodmethodArgs - array with method argumentsvalue - array of invariant annotations
public static boolean checkXOr(java.lang.Object thisObject,
java.lang.Object[] methodArgs,
InvariantAnnotation[] value)
thisObject - "this" at the time of the check, or null if not available; ignored by this methodmethodArgs - array with method argumentsvalue - array of invariant annotations
public static boolean checkNot(java.lang.Object thisObject,
java.lang.Object[] methodArgs,
InvariantAnnotation value)
thisObject - "this" at the time of the check, or null if not available; ignored by this methodmethodArgs - array with method argumentsvalue - invariant annotation
public static boolean checkImplies(java.lang.Object thisObject,
java.lang.Object[] methodArgs,
InvariantAnnotation[] value)
thisObject - "this" at the time of the check, or null if not available; ignored by this methodmethodArgs - array with method argumentsvalue - array of invariant annotations; must be of length two
public static boolean checkName(java.lang.Object thisObject,
java.lang.String value,
boolean regex)
thisObject - "this" at the time of the check, or null if not available; ignored by this methodvalue - string to compare the current thread's name toregex - true if value should be treated as a regular expression
public static boolean checkGroup(java.lang.Object thisObject,
java.lang.String value,
boolean regex)
thisObject - "this" at the time of the check, or null if not available; ignored by this methodvalue - string to compare the current thread's group toregex - true if value should be treated as a regular expression
public static boolean checkSynchronizedArgument(java.lang.Object thisObject,
java.lang.Object[] args,
int value)
thisObject - object that represents "this", or null if staticargs - array of method argumentsvalue - index of the method argument that should be checked
public static boolean checkMonitorOwned(java.lang.Object o)
o - object whose monitor should be checked; must be non-null
public static boolean checkSynchronizedField(java.lang.Object thisObject,
java.lang.Class fieldClass,
java.lang.String fieldName)
thisObject - "this" at the time of the check, or null if not available; ignored by this methodfieldClass - the class the field is infieldName - the name of the field
public static boolean checkSynchronizedFieldByName(java.lang.Object thisObject,
java.lang.String fieldClassName,
java.lang.String fieldName)
thisObject - "this" at the time of the check, or null if not available; ignored by this methodfieldClassName - the name of the class the field is infieldName - the name of the field
public static boolean checkEventThread(java.lang.Object thisObject)
thisObject - "this" at the time of the check, or null if not available; ignored by this method
public static boolean checkEventThreadAfterRealized(java.lang.Object thisObject)
thisObject - "this" at the time of the check, or null if not available; ignored by this method
public static boolean checkThread(java.lang.Object thisObject,
java.lang.Class fieldClass,
java.lang.String fieldName)
thisObject - "this" at the time of the check, or null if not available; ignored by this methodfieldClass - the class the field is infieldName - the name of the field
public static boolean checkThreadByName(java.lang.Object thisObject,
java.lang.String fieldClassName,
java.lang.String fieldName)
thisObject - "this" at the time of the check, or null if not available; ignored by this methodfieldClassName - the name of the class the field is infieldName - the name of the field
public static boolean checkNullArgument(java.lang.Object thisObject,
java.lang.Object[] args,
int value)
thisObject - object that represents "this", or null if staticargs - array of method argumentsvalue - index of the method argument that should be checked
public static boolean checkDistinctArguments(java.lang.Object thisObject,
java.lang.Object[] args,
int[] value)
thisObject - object that represents "this", or null if staticargs - array of method argumentsvalue - array of indices of the method argument that should be checked
public static boolean checkSameArguments(java.lang.Object thisObject,
java.lang.Object[] args,
int[] value)
thisObject - object that represents "this", or null if staticargs - array of method argumentsvalue - array of indices of the method argument that should be checked
public static boolean checkNumberBoundedArgument(java.lang.Object thisObject,
java.lang.Object[] args,
NumberBoundedArgument.Mode mode,
int index,
double bound,
double upperBound)
thisObject - object that represents "this", or null if staticargs - array of method argumentsmode - bounding modeindex - index of the method argument that should be checkedbound - boundupperBound - upper bound
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||