-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Modiy RxBus annotation method logic, will throw exceptions if meth…
…od invoke failed. 2. Refactor method. 3. Update demo. 4. Add javadoc.
- Loading branch information
Showing
32 changed files
with
352 additions
and
1,066 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
app/src/main/java/com/threshold/rxbus2demo/bean/DemoBean1.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.threshold.rxbus2demo.bean; | ||
|
||
/** | ||
* DemoBean1 | ||
* Created by threshold on 2018/1/24. | ||
*/ | ||
|
||
public class DemoBean1 { | ||
|
||
public DemoBean1() { | ||
} | ||
|
||
public DemoBean1(String data) { | ||
this.data = data; | ||
} | ||
|
||
private String data; | ||
|
||
public String getData() { | ||
return data; | ||
} | ||
|
||
public void setData(String data) { | ||
this.data = data; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "DemoBean1{" + | ||
"data='" + data + '\'' + | ||
'}'; | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
app/src/main/java/com/threshold/rxbus2demo/bean/DemoBean2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.threshold.rxbus2demo.bean; | ||
|
||
/** | ||
* DemoBean2 | ||
* Created by threshold on 2018/1/24. | ||
*/ | ||
|
||
public class DemoBean2 { | ||
|
||
public DemoBean2() { | ||
} | ||
|
||
public DemoBean2(Object data) { | ||
this.data = data; | ||
} | ||
|
||
private Object data; | ||
|
||
public Object getData() { | ||
return data; | ||
} | ||
|
||
public void setData(Object data) { | ||
this.data = data; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "DemoBean2{" + | ||
"data=" + data + | ||
'}'; | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
app/src/main/java/com/threshold/rxbus2demo/bean/event/DemoEvent1.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.threshold.rxbus2demo.bean.event; | ||
|
||
import android.support.annotation.NonNull; | ||
|
||
import com.threshold.rxbus2demo.bean.DemoBean1; | ||
|
||
/** | ||
* A Event that bring with a {@link DemoEvent1} | ||
* Created by threshold on 2018/1/24. | ||
*/ | ||
|
||
public class DemoEvent1 extends RxEvent { | ||
|
||
private DemoBean1 mDemoBean1; | ||
|
||
/** | ||
* Constructs a prototypical Event. | ||
* | ||
* @param source The object on which the Event initially occurred. | ||
* @throws IllegalArgumentException if source is null. | ||
*/ | ||
public DemoEvent1(@NonNull Object source, @NonNull DemoBean1 demoBean1) { | ||
super(source); | ||
this.mDemoBean1 = demoBean1; | ||
} | ||
|
||
@NonNull | ||
public DemoBean1 getDemoBean1() { | ||
return mDemoBean1; | ||
} | ||
} |
Oops, something went wrong.