TAILIEUCHUNG - Java 6 Platform Revealed phần 10

Tham khảo tài liệu 'java 6 platform revealed phần 10', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | CHAPTER 10 PLUGGABLE ANNOTATION PROCESSING UPDATES 191 rip If you declare your own annotations keep in mind the pattern shown here. Repeated annotations are not allowed so they must be grouped together into a single annotation. The Package The annotations found in the package are used by the capabilities added with JSR 269 for annotation processing. There are three annotations there SupportedAnnotationTypes SupportedOptions and SupportedSourceVersion. Each of these will be described later in the chapter in the Annotation Processing section. The Package The two annotations found in the package are DescriptorKey and MXBean. If you are familiar with the Java Management Extensions their usage will prove helpful. The DescriptorKey annotation is for describing annotation elements related to a field. For an attribute operation or construction you can add descriptors such that when the resulting descriptor is created you can configure its values. See the javadoc for the DescriptorKey annotation for more information about auto-conversion of annotation elements such as rules for how a primitive becomes an object. The MXBean annotation is used to explicitly tag an interface as an MXBean interface or not. If the interface name ends in MXBean it is an MXBean interface by default. If it doesn t then the interface isn t an MXBean-related interface. The @MXBean annotation allows you to tag an interface as an MXBean if it doesn t end with MXBean and allows you to reject the automatic association if you don t want it. For the positive case the following three declarations in Listing 10-5 are defined to be MXBean interfaces assuming proper imports. Listing 10-5. @MXBean Annotation Usage Default naming public interface MyMXBean @MXBean public interface MyInterface1 @MXBean true public interface MyInterface2 192 CHAPTER 10 PLUGGABLE ANNOTATION PROCESSING UPDATES For the negative cases there are .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.