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
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 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
-
难度 2/5 1-3 小时 新手友好度 70/100
commonmark/commonmark-java#460 ·
-
难度 2/5 1-3 小时 新手友好度 86/100
-
1.21.1见幽匿感测体就崩溃未关闭
难度 2/5 1-3 小时 新手友好度 75/100
-
Make branch and label autocomplete matching locale-independent可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 83/100
jenkinsci/gitlab-plugin#1950 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
commons-app/apps-android-commons#6984 ·
维护者通常 2 天内回复