It is just my opinion, so don't you attack me. please!
But if this posting has some incorrect informations, you comment about that
Please!!
@Override
public static boolean equals(Object o) {
....
}
<Annotation์ ์ฌ์ฉ ์>
Annotation์ ์ข
๋ฅ ๋ฐ ์ฒ๋ฆฌ ์๊ฐ
ยท JDK 5๋ถํฐ ๋ฑ์ฅํ์ผ๋ฉฐ, ๊ธฐ๋ณธ์ ์ผ๋ก ์ ๊ณตํ๋ Annotaion์ผ๋ก๋ @Deprecated, @Override, @SuppressWarnings ๋ฑ์ด ์๊ณ , ๊ฐ๋ฐ์๊ฐ ์ ์ํ์ฌ ๋ง๋ค ์ ์๋ Custom Annotation์ด ์๋ค.
ยท Annotation์ compile-time์ ์ฒ๋ฆฌ๋๊ฑฐ๋ run-time์ ์ฒ๋ฆฌ๋๋ฉด์ reflection์ ํตํด ํด๋์ค์ ๊ตฌ์ฑ์ ๋ณด๋ฅผ ํ์ธํ์ฌ ๊ธฐ๋ฅ์ ์ํํ ์ ์๋๋ก ํ ์ ์๋ค.
ยท ์ถ๊ฐ์ ์ผ๋ก @Override ๋ฉ์๋์ ์ด๋ฆ ๋๋ ํ๋ผ๋ฏธํฐ๊ฐ ์๋ชป๋ ๊ฒฝ์ฐ, compiler checking์ ํ๋ฉด์ ์๋ชป ๋์์์ ๊ฒฝ๊ณ ํด์ค๋ค.
Annotation์ ์ ์ฌ์ฉํ๋๊ฐ?
ยท ์์ค์ฝ๋์ ๊ฐ๋
์ฑ์ ๋์ฌ์ค๋ค. Annotation์ ๋ณด๊ณ ์ด ์ฝ๋๊ฐ ์ด๋ค ์ํ์ ํ๋์ง ์์ธกํ ์ ์๋ค.
ยท Annotation์ ์ฌ์ฉํ๋ฉด์ ์ป์ ์ ์๋ ๊ฐ์ฅ ํฐ ์ฅ์ ์ AOP(Aspect Oriented Programming)์ ํ ์ ์๋ค๋ ์ ์ด๋ค.
AOP๊ฐ ์ ํ์ํ๊ฐ?
ยท Java๋ ๊ธฐ๋ณธ์ ์ผ๋ก OOP(Object Oriented Programming)์ ํน์ฑ์ ๊ฐ์ง๋ค.
ยท ๋ค์ ๊ทธ๋ฆผ์ OOP์ ํน์ฑ์ ํ์ฉํ์ฌ ์์ฑ๋ ํด๋์ค๋ค์ ๋ค์ด์ด๊ทธ๋จ์ด๋ค.
์ ์ ์๋ ์ญํ ์ ์ํํ๋ค์ ์๋ฐฐ๋๋ ๊ฒ์ด๋ค.