@Immutable annotation for value classes
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
Hướng nghiên cứu
Issue không nêu tệp nguồn hay đường dẫn kiểm thử nào; hãy bắt đầu bằng cách xem xét các định nghĩa annotation hiện có trong repository và các quy ước của chúng. Công việc được xem là hoàn tất khi thêm một annotation @Immutable tương đương với ngữ nghĩa bất biến được ghi lại bằng tài liệu và siêu dữ liệu phù hợp về kiểu, retention và tài liệu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi!
I am currently migrating a projeect from jsr305 to java-annotations. One of the annotations I can't really seem to find an equivalent for is @Immutable. A class being @Immutable should not have setters and possibly not even non-final fields.
The original implementation and documentation:
/**
* The class to which this annotation is applied is immutable. This means that
* its state cannot be seen to change by callers. Of necessity this means that
* all public fields are final, and that all public final reference fields refer
* to other immutable objects, and that methods do not publish references to any
* internal state which is mutable by implementation even if not by design.
* Immutable objects may still have internal mutable state for purposes of
* performance optimization; some state variables may be lazily computed, so
* long as they are computed from immutable state and that callers cannot tell
* the difference.
* <p>
* Immutable objects are inherently thread-safe; they may be passed between
* threads or published without synchronization.
*/
@Documented
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.CLASS)
public @interface Immutable {
}
- Ngôn ngữ chính
- Kotlin
- Star
- 464
- Fork
- 74
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của JetBrains/java-annotations
-
@TestOnly should be allowed for ElementType.PACKAGECó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
JetBrains/java-annotations#123 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
JetBrains/java-annotations#134 · 6 bình luận · 1 reaction ·
-
Add AndroidTarget as KMP targetCó thể làm lại được @serjsysoev đã nhận 515 ngày trước và không có pull request nào đang mở. Đang mở
JetBrains/java-annotations#125 · 1 reaction · 1 người được giao ·
-
Double/float range annotationĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
JetBrains/java-annotations#122 · 2 bình luận ·
-
Allow use of @Language on (formatted-)string literalsCó thể làm lại được @serjsysoev đã nhận 691 ngày trước và không có pull request nào đang mở. Đang mở
JetBrains/java-annotations#117 · 4 bình luận · 1 người được giao ·
Tất cả issue của JetBrains/java-annotations
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
nightscout/AndroidAPS#5211 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
jellyfin/jellyfin-android#2231 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Place type search does not workĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
commons-app/apps-android-commons#6984 ·
Maintainer thường phản hồi trong vòng 2 ngày