You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
섹션6. 동적 프록시 기술
1️⃣ 리플렉션
➡️ ReflectionTest
➡️ ReflectionTest - reflection1 추가
Method method: 첫 번째 파라미터는 호출할 메서드 정보가 넘어온다. 이것이 핵심이다. 기존에는 메서드 이름을 직접 호출했지만, 이제는
Method라는 메타정보를 통해서 호출할 메서드 정보가 동적으로 제공된다.
Object target: 실제 실행할 인스턴스 정보가 넘어온다. 타입이Object라는 것은 어떠한 인스턴스도받을 수 있다는 뜻이다. 물론
method.invoke(target)를 사용할 때 호출할 클래스와 메서드 정보가서로 다르면 예외가 발생한다.Beta Was this translation helpful? Give feedback.
All reactions