staticInitializer 프로브 단편

staticInitializer 프로브 단편 유형을 사용하면 모든 프로브된 클래스의 클래스 초기화 프로그램에 새 코드를 삽입할 수 있습니다. 클래스에 클래스 초기화 프로그램이 없으면 클래스 초기화 프로그램이 작성됩니다.

staticInitializer 단편 코드는 프로브된 클래스의 클래스 초기화 프로그램에 있는 원본 코드 이전에 실행됩니다. 프로브에서 staticField 객체를 사용하는 경우 staticInitializer 단편 코드가 실행되기 전에 새 정적 필드는 기본값으로 구성됩니다.

다음과 같은 데이터 항목을 staticInitializer 단편에 사용할 수 있습니다.
  • className
  • staticField
  • classSourceFile
  • methodNames
  • methodLineTables

<fragment type="staticInitializer">
  <data type="className" name="cn"/>
  <code>
    System.out.println("[Class " + cn + " is being loaded.]");
  </code>
</fragment>

상위 주제: Probekit 요소 참조

관련 참조
단편 프로브 객체
데이터 프로브 객체

관련 정보
staticField 및 staticInitializer 예

이용약관 | 피드백
(C) Copyright IBM Corporation 2000, 2004. All Rights Reserved.