-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from alibaba/develop
Add object autowired support.
- Loading branch information
Showing
22 changed files
with
364 additions
and
95 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
21 changes: 21 additions & 0 deletions
21
app/src/main/java/com/alibaba/android/arouter/demo/testinject/TestObj.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,21 @@ | ||
package com.alibaba.android.arouter.demo.testinject; | ||
|
||
/** | ||
* TODO:Feature | ||
* | ||
* @author zhilong <a href="mailto:[email protected]">Contact me.</a> | ||
* @version 1.0 | ||
* @since 2017/3/16 下午4:42 | ||
*/ | ||
public class TestObj { | ||
public String name; | ||
public int id; | ||
|
||
public TestObj() { | ||
} | ||
|
||
public TestObj(String name, int id) { | ||
this.name = name; | ||
this.id = id; | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
app/src/main/java/com/alibaba/android/arouter/demo/testinject/TestParcelable.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,52 @@ | ||
package com.alibaba.android.arouter.demo.testinject; | ||
|
||
import android.os.Parcel; | ||
import android.os.Parcelable; | ||
|
||
/** | ||
* TODO:Feature | ||
* | ||
* @author zhilong <a href="mailto:[email protected]">Contact me.</a> | ||
* @version 1.0 | ||
* @since 2017/3/16 下午4:42 | ||
*/ | ||
public class TestParcelable implements Parcelable { | ||
public String name; | ||
public int id; | ||
|
||
public TestParcelable() { | ||
} | ||
|
||
public TestParcelable(String name, int id) { | ||
this.name = name; | ||
this.id = id; | ||
} | ||
|
||
protected TestParcelable(Parcel in) { | ||
name = in.readString(); | ||
id = in.readInt(); | ||
} | ||
|
||
@Override | ||
public void writeToParcel(Parcel dest, int flags) { | ||
dest.writeString(name); | ||
dest.writeInt(id); | ||
} | ||
|
||
@Override | ||
public int describeContents() { | ||
return 0; | ||
} | ||
|
||
public static final Creator<TestParcelable> CREATOR = new Creator<TestParcelable>() { | ||
@Override | ||
public TestParcelable createFromParcel(Parcel in) { | ||
return new TestParcelable(in); | ||
} | ||
|
||
@Override | ||
public TestParcelable[] newArray(int size) { | ||
return new TestParcelable[size]; | ||
} | ||
}; | ||
} |
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
25 changes: 25 additions & 0 deletions
25
arouter-annotation/src/main/java/com/alibaba/android/arouter/facade/enums/TypeKind.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,25 @@ | ||
package com.alibaba.android.arouter.facade.enums; | ||
|
||
/** | ||
* Kind of field type. | ||
* | ||
* @author Alex <a href="mailto:[email protected]">Contact me.</a> | ||
* @version 1.0 | ||
* @since 2017-03-16 19:13:38 | ||
*/ | ||
public enum TypeKind { | ||
// Base type | ||
BOOLEAN, | ||
BYTE, | ||
SHORT, | ||
INT, | ||
LONG, | ||
CHAR, | ||
FLOAT, | ||
DOUBLE, | ||
|
||
// Other type | ||
STRING, | ||
PARCELABLE, | ||
OBJECT; | ||
} |
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
Oops, something went wrong.