@Retention(value=CLASS) @Target(value=METHOD) public @interface SupposeBackground
IllegalStateException
will be thrown (by default).
Example :@EBean public class MyBean { @SupposeBackground boolean someMethodThatShouldNotBeCalledFromUiThread() { //if this method will be called from the UI-thread an exception will be thrown } @SupposeBackground(serial = {"serial1", "serial2"}) boolean someMethodThatShouldBeCalledFromSerial1OrSerial2() { //if this method will be called from another thread then a background thread with a //serial "serial1" or "serial2", an exception will be thrown } }
public abstract String[] serial
Copyright © 2010-2014. All Rights Reserved.