6
Java 주석의 의미 체계가 기능 본체 안에 어딘가에 을 배치 할 수있게합니다. 특정 함수 호출, 명령문 또는 표현식에 주석을 추가 하시겠습니까? 예를 들어메소드 본문 내에서 주석을 사용할 수 있습니까?
:
class MyClass {
void theFunc(Thing thing) {
String s = null;
try {
s = thing.getProp().getSub().getElem().getItem();
} catch(NullPointerException ex) { }
if(s==null)
System.out.println("null, you fool");
}
}
이 의 개념이 포함 된 경우 주석 수 모든 :
class MyClass {
void theFunc(Thing thing) {
String s = null;
@Catching(NullPointerException) //<< annotation ?
s = thing.getProp().getSub().getElem().getItem();
if(s==null)
System.out.println("null, you fool");
}
}
가 자주 기록 (! 너무 자주, definitly)를 생략하려면? 아니면 비슷한 무엇입니까?