01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.object.bytecode.hook;
05:
06: /**
07: * Modify byte[] before being loaded as a class by the classloader
08: */
09: public interface ClassPreProcessor {
10:
11: /**
12: *
13: * XXX::NOTE:: ClassLoader checks the returned byte array to see if the class is instrumented or not to maintain the
14: * offset.
15: * @param name The class name
16: * @param data Data buffer
17: * @param offset Offset into data
18: * @param length Length of class data after offset
19: * @param caller The classloader loading the class
20: * @return new byte array if the class is instrumented and same input byte array if not.
21: * @see ClassLoaderPreProcessorImpl
22: */
23: public byte[] preProcess(String name, byte[] data, int offset,
24: int length, ClassLoader caller);
25:
26: }
|