com.caucho.loader.enhancer
Class EnhancerFixup

java.lang.Object
  extended by com.caucho.loader.enhancer.EnhancerFixup

@Module
public class EnhancerFixup
extends java.lang.Object

Class loader which checks for changes in class files and automatically picks up new jars.

DynamicClassLoaders can be chained creating one virtual class loader. From the perspective of the JDK, it's all one classloader. Internally, the class loader chain searches like a classpath.


Constructor Summary
EnhancerFixup()
           
 
Method Summary
 void addEnhancer(ClassEnhancer enhancer)
          Adds a class enhancer.
protected  void cleanExtConstantPool(java.lang.String className, JavaClass extClass)
          Cleans the ext constant pool, renaming
protected  void fixup(java.lang.String className, java.lang.String extClassName)
           
 JavaClassLoader getJavaClassLoader()
          Returns the parsed class loader.
 Path getPostWorkPath()
          Gets the work path.
 Path getPreWorkPath()
          Gets the work path.
 Path getWorkPath()
          Gets the work path.
protected  void mergeClasses(java.lang.String className, JavaClass baseClass, JavaClass extClass)
          Merges the two classes.
protected  void mergeClasses(java.lang.String className, Path targetPath, Path extPath)
          Merges the two classes.
protected  void mergeClasses(java.lang.String className, Path targetPath, Path sourcePath, Path extPath)
          Merges the two classes.
protected  void postEnhance(JavaClass baseClass)
          After enhancement fixup.
protected  void renameExtSuperMethods(java.lang.String className, JavaClass baseClass, JavaClass extClass)
          Renamed the super() methods
protected  void renameSubClass(java.lang.String className, Path targetPath, Path extPath)
          Merges the two classes.
 void setClassLoader(DynamicClassLoader loader)
          Sets the class loader.
 void setJavaClassLoader(JavaClassLoader jClassLoader)
          Returns the parsed class loader.
 void setWorkPath(Path workPath)
          Sets the work path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnhancerFixup

public EnhancerFixup()
Method Detail

setClassLoader

public void setClassLoader(DynamicClassLoader loader)
Sets the class loader.


setJavaClassLoader

public void setJavaClassLoader(JavaClassLoader jClassLoader)
Returns the parsed class loader.


getJavaClassLoader

public JavaClassLoader getJavaClassLoader()
Returns the parsed class loader.


getWorkPath

public Path getWorkPath()
Gets the work path.


setWorkPath

public void setWorkPath(Path workPath)
Sets the work path.


getPreWorkPath

public final Path getPreWorkPath()
Gets the work path.


getPostWorkPath

public final Path getPostWorkPath()
Gets the work path.


addEnhancer

public void addEnhancer(ClassEnhancer enhancer)
Adds a class enhancer.


fixup

protected void fixup(java.lang.String className,
                     java.lang.String extClassName)
              throws java.lang.Exception
Throws:
java.lang.Exception

renameSubClass

protected void renameSubClass(java.lang.String className,
                              Path targetPath,
                              Path extPath)
                       throws java.lang.Exception
Merges the two classes.

Throws:
java.lang.Exception

renameExtSuperMethods

protected void renameExtSuperMethods(java.lang.String className,
                                     JavaClass baseClass,
                                     JavaClass extClass)
                              throws java.lang.Exception
Renamed the super() methods

Throws:
java.lang.Exception

mergeClasses

protected void mergeClasses(java.lang.String className,
                            Path targetPath,
                            Path sourcePath,
                            Path extPath)
                     throws java.lang.Exception
Merges the two classes.

Throws:
java.lang.Exception

mergeClasses

protected void mergeClasses(java.lang.String className,
                            Path targetPath,
                            Path extPath)
                     throws java.lang.Exception
Merges the two classes.

Throws:
java.lang.Exception

postEnhance

protected void postEnhance(JavaClass baseClass)
                    throws java.lang.Exception
After enhancement fixup.

Throws:
java.lang.Exception

mergeClasses

protected void mergeClasses(java.lang.String className,
                            JavaClass baseClass,
                            JavaClass extClass)
                     throws java.lang.Exception
Merges the two classes.

Throws:
java.lang.Exception

cleanExtConstantPool

protected void cleanExtConstantPool(java.lang.String className,
                                    JavaClass extClass)
                             throws java.lang.Exception
Cleans the ext constant pool, renaming

Throws:
java.lang.Exception