org.apache.cayenne.jpa.instrument
Class UnitClassTransformer
java.lang.Object
org.apache.cayenne.jpa.instrument.UnitClassTransformer
public class UnitClassTransformer
- extends Object
A ClassFileTransformer decorator that wraps a Java instrumentation ClassFileTransformer
instance in a JPA ClassTransformer. UnitClassTranformer would only do transformation of
the mapped classes.
- Author:
- Andrus Adamchik
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tempClassLoader
protected ClassLoader tempClassLoader
logger
protected org.apache.commons.logging.Log logger
transformer
protected ClassFileTransformer transformer
managedClasses
protected Map<String,JpaClassDescriptor> managedClasses
UnitClassTransformer
public UnitClassTransformer(Map<String,JpaClassDescriptor> managedClasses,
ClassLoader tempClassLoader,
ClassFileTransformer transformer)
transform
public byte[] transform(ClassLoader loader,
String className,
Class<?> classBeingRedefined,
ProtectionDomain protectionDomain,
byte[] classfileBuffer)
throws IllegalClassFormatException
- Throws:
IllegalClassFormatException
isManagedClass
protected boolean isManagedClass(String className)
- Returns true if a classname os a part of an entity map. Note that the class name is
expected in the internal format, separated by "/", not ".".
Copyright © 2001-2007 Apache Cayenne. All Rights Reserved.