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

  • 0TACTICAL0HIPPY0

    0TACTICAL0HI

    30 EYLÜL 2012
  • boogie2988

    boogie2988

    6 NİSAN 2006
  • schmittastic

    schmittastic

    9 EYLÜL 2009