Effective Java



Download 2,19 Mb.
Pdf ko'rish
bet231/341
Sana11.07.2022
Hajmi2,19 Mb.
#776765
1   ...   227   228   229   230   231   232   233   234   ...   341
Bog'liq
Effective Java



ITEM 56: WRITE DOC COMMENTS FOR ALL EXPOSED API ELEMENTS
259
When documenting an annotation type, be sure to document any mem-
bers
as well as the type itself. Document members with noun phrases, as if they
were fields. For the summary description of the type, use a verb phrase that says
what it means when a program element has an annotation of this type:
/**
* Indicates that the annotated method is a test method that
* must throw the designated exception to pass.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface ExceptionTest {
/**
* The exception that the annotated test method must throw
* in order to pass. (The test is permitted to throw any
* subtype of the type described by this class object.)
*/
Class value();
}
Package-level doc comments should be placed in a file named 
package-
info.java
. In addition to these comments, 
package-info.java
must contain a
package declaration and may contain annotations on this declaration. Similarly, if
you elect to use the module system (Item 15), module-level comments should be
placed in the 
module-info.java
file.
Two aspects of APIs that are often neglected in documentation are thread-
safety and serializability. 

Download 2,19 Mb.

Do'stlaringiz bilan baham:
1   ...   227   228   229   230   231   232   233   234   ...   341




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish