InitialTransformer.java :  » Web-Framework » rife-1.6.1 » com » uwyn » rife » instrument » Java Open Source

Java Open Source » Web Framework » rife 1.6.1 
rife 1.6.1 » com » uwyn » rife » instrument » InitialTransformer.java
/*
 * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
 * Distributed under the terms of either:
 * - the common development and distribution license (CDDL), v1.0; or
 * - the GNU Lesser General Public License, v2.1 or later
 * $Id: InitialTransformer.java 3811 2007-06-25 15:06:16Z gbevin $
 */
package com.uwyn.rife.instrument;

import com.uwyn.rife.tools.InstrumentationUtils;
import java.lang.instrument.IllegalClassFormatException;
import java.security.ProtectionDomain;

/**
 * This is a no-op transformer that is just used to output the initial
 * bytecode of classes that will be instrumented when the {@value com.uwyn.rife.tools.InstrumentationUtils#PROPERTY_RIFE_INSTRUMENTATION_DUMP}
 * system property is set.
 * 
 * @author Geert Bevin (gbevin[remove] at uwyn dot com)
 * @version $Revision: 3811 $
 * @since 1.6
 */
public class InitialTransformer extends RifeTransformer
{
  protected byte[] transformRife(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException
  {
    InstrumentationUtils.dumpClassBytes("initial", className, classfileBuffer);
    return classfileBuffer;
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.