Classes don't expose static fields from interfaces

Đang mở
#16 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java, typescript
Lĩnh vực
tooling

Hướng nghiên cứu

Bắt đầu bằng cách lần theo tùy chọn build thử nghiệm tạo ra khai báo cho Telephony.Sms.Inbox của Android và các interface mà nó triển khai. So sánh khai báo Inbox được tạo với TextBasedSmsColumns.BODY và xác định các trường tĩnh được kế thừa nên xuất hiện như thế nào. Hoàn tất có nghĩa là Inbox.BODY khả dụng trong các khai báo TypeScript được tạo, với coverage cho ví dụ này.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

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 :)

Ngôn ngữ chính
Java
Star
96
Fork
25
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NativeScript/android-dts-generator

Tất cả issue của NativeScript/android-dts-generator

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.