1 23 24 25 package com.sun.jdo.api.persistence.enhancer; 26 27 import java.io.InputStream ; 28 import java.io.OutputStream ; 29 30 import com.sun.jdo.api.persistence.enhancer.util.Support; 31 32 33 35 36 public final class ByteCodeEnhancerTimer 38 extends Support 39 implements ByteCodeEnhancer 40 { 41 final protected ByteCodeEnhancer delegate; 43 44 47 public ByteCodeEnhancerTimer(ByteCodeEnhancer delegate) 48 { 49 affirm(delegate); 50 this.delegate = delegate; 51 } 52 53 public boolean enhanceClassFile(InputStream inByteCode, 54 OutputStream outByteCode) 55 throws EnhancerUserException, EnhancerFatalError 56 { 57 try { 58 timer.push("ByteCodeEnhancer.enhanceClassFile(InputStream,OutputStream)"); return delegate.enhanceClassFile(inByteCode, outByteCode); 60 } finally { 61 timer.pop(); 62 } 63 } 64 65 public boolean enhanceClassFile(InputStream inByteCode, 66 OutputStreamWrapper outByteCode) 67 throws EnhancerUserException, EnhancerFatalError 68 { 69 try { 70 timer.push("ByteCodeEnhancer.enhanceClassFile(InputStream,OutputStreamWrapper)"); return delegate.enhanceClassFile(inByteCode, outByteCode); 72 } finally { 73 timer.pop(); 74 } 75 } 76 } 77 | Popular Tags |