-
-
Notifications
You must be signed in to change notification settings - Fork 459
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
修复解析器onParse方法返回可空类型时,ksp编译报错问题 #456
- Loading branch information
1 parent
d8aa537
commit 4a6eee6
Showing
8 changed files
with
119 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.rxhttp.compiler | ||
|
||
import rxhttp.wrapper.parse.TypeParser | ||
|
||
/** | ||
* User: ljx | ||
* Date: 2023/8/28 | ||
* Time: 11:12 | ||
*/ | ||
open class TestParser1<T, F, S> : TypeParser<F> { | ||
|
||
protected constructor() : super() | ||
override fun onParse(response: okhttp3.Response): F { | ||
TODO("Not yet implemented") | ||
} | ||
} |
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,32 @@ | ||
package com.rxhttp.compiler | ||
|
||
import com.example.httpsender.entity.Response | ||
import com.example.httpsender.entity.User | ||
import rxhttp.wrapper.annotation.Parser | ||
import rxhttp.wrapper.callback.Consumer | ||
import java.lang.reflect.Type | ||
|
||
/** | ||
* User: ljx | ||
* Date: 2023/8/28 | ||
* Time: 11:12 | ||
*/ | ||
@Parser(name = "test") | ||
class TestParser2<A, B, C>: TestParser1<A, Response<B?>?, C>, | ||
rxhttp.wrapper.parse.Parser<Response<B?>?> { | ||
|
||
protected constructor() : super() | ||
|
||
constructor(typeT: Type, typeF: Type, typeS: Type) | ||
|
||
override fun onParse(response: okhttp3.Response): Response<B?> { | ||
TODO("Not yet implemented") | ||
// return null | ||
// return super.onParse(response) | ||
} | ||
|
||
// override fun accept(t: User) { | ||
// TODO("Not yet implemented") | ||
// } | ||
|
||
} |
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