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

  • calicoJake

    calicoJake

    29 EKİM 2007
  • Numberphile

    Numberphile

    15 EYLÜL 2011
  • Rugiagialia

    Rugiagialia

    1 Ocak 2008