Classes don't expose static fields from interfaces
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- java, typescript
- 领域
- tooling
调研方向
首先追踪用于生成 Android 的 Telephony.Sms.Inbox 及其实现接口声明的实验性构建选项。将生成的 Inbox 声明与 TextBasedSmsColumns.BODY 进行比较,并确定继承的静态字段应如何出现。完成的标准是:在生成的 TypeScript 声明中可以使用 Inbox.BODY,并且此示例有覆盖。
由索引模型根据 Issue 内容生成。
描述
Hi,
I'm using the aforementioned experimental build option and it is quite handy.
What I noticed though is that if there is an inheritance then it is not possible to access the base class field from the derived class. Say, Android has the Telephony.Sms.Inbox.BODY where Inbox is
public static final class Inbox implements BaseColumns, TextBasedSmsColumns
and BODY is defined in the TextBasedSmsColumns. What ends up generated is:
export class Inbox extends java.lang.Object implements android.provider.BaseColumns, android.provider.Telephony.TextBasedSmsColumns {
public static CONTENT_URI: android.net.Uri;
public static DEFAULT_SORT_ORDER: string;
}
and basically an attempt to use in a native-like way android.provider.Telephony.Sms.Inbox.BODY fails, instead I need to do android.provider.Telephony.TextBasedSmsColumns.BODY.
Something you may want to check out and some point :)
Thank you!
P.S.: also keeping the original parameter names instead of paramX would have been nice, though I guess that's in the works too :)
- 主要语言
- Java
- 星标
- 96
- 派生
- 25
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NativeScript/android-dts-generator 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 45/100
NativeScript/android-dts-generator#84 · 4 条评论 ·
-
难度 4/5 3-5 天 新手友好度 48/100
-
难度 4/5 3-5 天 新手友好度 25/100
-
难度 4/5 3-5 天 新手友好度 30/100
查看 NativeScript/android-dts-generator 的全部 Issue
相似的 Issue
-
Bug Java Platform: Java
难度 2/5 1-3 小时 新手友好度 78/100
getsentry/sentry-java#6138 · 1 条评论 ·
-
bug needs triage p2
难度 2/5 1-3 小时 新手友好度 78/100
GoogleCloudPlatform/DataflowTemplates#4273 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 76/100
-
bug needs triage
难度 2/5 1-3 小时 新手友好度 76/100