SORU
24 HAZİRAN 2010, PERŞEMBE


codestyle; javadoc önce veya sonra ek açıklama koymak?

Sorunların en önemli olmadığını biliyorum, ama ya sonra açıklama önce javadoc yorum bloğu koymak olduğunu fark etmemiştim. Biz bir kodlama standart olarak kabul etmek istiyorsun?

/**
 * This is a javadoc comment before the annotation 
 */
@Component
public class MyClass {

    @Autowired
    /**
     * This is a javadoc comment after the annotation
     */
    private MyOtherClass other;
}

CEVAP
24 HAZİRAN 2010, PERŞEMBE


Açıklama, önce, sonra vb kodu "ait" sınıfı. Resmi belgeler examples with javadoc bkz.

İşte another official Java page buldum rasgele bir örnek:

/**
 * Delete multiple items from the list.
 *
 * @deprecated  Not for public use.
 *    This method is expected to be retained only as a package
 *    private method.  Replaced by
 *    {@link #remove(int)} and {@link #removeAll()}
 */
@Deprecated public synchronized void delItems(int start, int end) {
    ...
}

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Mega64

    Mega64

    24 ŞUBAT 2006
  • The Onion

    The Onion

    14 Mart 2006
  • Virtual Riot

    Virtual Riot

    19 Mayıs 2011