edu.rice.cs.cunit.threadCheck
Annotation Type OnlyRunBy
@Retention(value=CLASS)
@Target(value={CONSTRUCTOR,METHOD,TYPE})
public @interface OnlyRunBy
Annotation for a class or method signaling that it should only be run by the designated threads.
The preferred method is using value and an array of @ThreadDesc annotations. This, however,
can be mixed with the other ways of specifying threads, although they may not support more advanced
features. The thread and thread group names are treated as regular expressions. You may not specify
eventThread=true in more than once place.
- Author:
- Mathias Ricken
value
public abstract ThreadDesc[] value
- Returns:
- array of thread descriptions.
- Default:
- {}
threadNames
public abstract java.lang.String[] threadNames
- Returns:
- array of regular expressions for thread names that may exclusively run the annotated class or method.
- Default:
- {}
threadIds
public abstract long[] threadIds
- Returns:
- array of thread ID numbers as returned by Thread.getID(), designating the threads
that may exclusively run the annotated class or method.
- Default:
- {}
threadGroups
public abstract java.lang.String[] threadGroups
- Returns:
- array of regular expressions for thread group names that may exclusively run the annotated class or
method.
- Default:
- {}
eventThread
public abstract OnlyRunBy.EVENT_THREAD eventThread
- Returns:
- true if the event thread may exclusively run the annotated class or method.
- Default:
- edu.rice.cs.cunit.threadCheck.OnlyRunBy.EVENT_THREAD.NO