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 프로브 단편

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