@Retention(value=CLASS) @Target(value=METHOD) public @interface SupposeUiThread
IllegalStateException will be thrown (by default).
Example :
@EBean
public class MyBean {
@SupposeUiThread
boolean someMethodThatShouldBeCalledOnlyFromUiThread() {
// if this method will be called from a background thread an exception
// will be thrown
}
}
Copyright © 2010-2015. All Rights Reserved.