ExecutableUnit 예제

이 예제는 ExecutableUnit 프로브 단편의 사용 방법을 예시합니다.

이 예제에서 프로브는 로드되는 모든 클래스에 대한 소스 파일 이름, 메소드 이름 및 행 테이블을 포함한 추적 행을 System.out에 생성한 후, 실행되는 모든 실행 가능 단위에 대한 추적 행을 생성합니다.

<?xml version="1.0" encoding="ASCII"?>
<probekit>
  <probe>
    <fragment type="staticInitializer">
      <data type="className" name="cname" />
      <data type="classSourceFile" name= "csource" />
      <data type="methodNames" name="mnames" />
      <data type="methodLineTables" name="mltables" />
      <code>
        System.out.println(" [ClassLoad: " + cname +
	" source: " + csource +
	" methods: " + mnames +
	" linetables: " + mltables + "]");
      </code>
    </fragment>
    <fragment type="executableUnit">
      <data type="methodNumber" name="mnum" />
      <data type="executableUnitNumber" name="eunum" />
      <code>
        System.out.println("[hit method " + mnum + " eu " + eunum + "]");
      </code>
    </fragment>
  </probe>
</probekit>

상위 주제: Probekit 예제

관련 참조
executableUnit 프로브 단편

Copyright IBM Corporation and others 2000, 2004.