Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.jpa.instrument
Class UnitClassTransformer

    java.lang.Object
      org.apache.cayenne.jpa.instrument.UnitClassTransformer

All Implemented Interfaces:
  javax.persistence.spi.ClassTransformer

    public class UnitClassTransformer

extends Object
implements javax.persistence.spi.ClassTransformer

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

Field Summary
`protected org.apache.commons.logging.Log` | `logger`
`protected Map<String,JpaClassDescriptor>` | `managedClasses`
`protected ClassLoader` | `tempClassLoader`
`protected ClassFileTransformer` | `transformer`

Constructor Summary
`UnitClassTransformer(Map<String,JpaClassDescriptor> managedClasses, ClassLoader tempClassLoader, ClassFileTransformer transformer)`

Method Summary
`protected boolean` | `isManagedClass(String className)` Returns true if a classname os a part of an entity map.
`byte[]` | `transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### tempClassLoader

    protected ClassLoader tempClassLoader

### logger

    protected org.apache.commons.logging.Log logger

### transformer

    protected ClassFileTransformer transformer

### managedClasses

    protected Map<String,JpaClassDescriptor> managedClasses

Constructor Detail

### UnitClassTransformer

    public UnitClassTransformer(Map<String,JpaClassDescriptor> managedClasses,
                                ClassLoader tempClassLoader,
                                ClassFileTransformer transformer)

Method Detail

### transform

    public byte[] transform(ClassLoader loader,
                            String className,
                            Class<?> classBeingRedefined,
                            ProtectionDomain protectionDomain,
                            byte[] classfileBuffer)
                     throws IllegalClassFormatException

  Specified by:
    `transform` in interface `javax.persistence.spi.ClassTransformer`
  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 ".".

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2008 Apache Cayenne. All Rights Reserved.