org.apache.openjpa.enhance
Class PCClassFileTransformer

java.lang.Object
  extended by org.apache.openjpa.enhance.PCClassFileTransformer
All Implemented Interfaces:
ClassFileTransformer

public class PCClassFileTransformer
extends Object
implements ClassFileTransformer

Transformer that makes persistent classes implement the PersistenceCapable interface at runtime.

Author:
Abe White

Constructor Summary
PCClassFileTransformer(MetaDataRepository repos, Options opts, ClassLoader loader)
          Constructor.
PCClassFileTransformer(MetaDataRepository repos, PCEnhancer.Flags flags, ClassLoader tmpLoader, boolean devscan)
          Constructor.
 
Method Summary
 byte[] transform(ClassLoader loader, String className, Class redef, ProtectionDomain domain, byte[] bytes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PCClassFileTransformer

public PCClassFileTransformer(MetaDataRepository repos,
                              Options opts,
                              ClassLoader loader)
Constructor.

Parameters:
repos - metadata repository to use internally
opts - enhancer configuration options
loader - temporary class loader for loading intermediate classes

PCClassFileTransformer

public PCClassFileTransformer(MetaDataRepository repos,
                              PCEnhancer.Flags flags,
                              ClassLoader tmpLoader,
                              boolean devscan)
Constructor.

Parameters:
repos - metadata repository to use internally
flags - enhancer configuration
loader - temporary class loader for loading intermediate classes
devscan - whether to scan the dev classpath for persistent types if none are configured
Method Detail

transform

public byte[] transform(ClassLoader loader,
                        String className,
                        Class redef,
                        ProtectionDomain domain,
                        byte[] bytes)
                 throws IllegalClassFormatException
Specified by:
transform in interface ClassFileTransformer
Throws:
IllegalClassFormatException


Copyright © 2006 Apache Software Foundation. All Rights Reserved.