excilys/androidannotations — pull request #780 by Artyomcool (2013-11-03 13:53:23+00:00)
Title: Support for annotations to check the current thread (or task's serial)

Hi,

Lets assume we have a long-term methods that provide result by simply returning that. This allows to make robust and reusable components and easily compose another methods from them.
In some cases it is much easier to control data consistence by restricting threads that allowed to invoke some of them.
I've implemented two annotations:
```java
@SupposeUiThread
@SupposeBackground
```
It will generate neccessary checks and you can control what happens if expectation fails by
```java
BackgroundExecutor.setWrongThreadListener(...)
```