net.sourceforge.retroweaver
Class RetroWeaver

java.lang.Object
  extended by net.sourceforge.retroweaver.RetroWeaver

public class RetroWeaver
extends java.lang.Object

A bytecode enhancer that translates Java 1.5 class files into Java 1.4 class files. The enhancer performs primarily two tasks: 1) Reverses changes made to the class file format in 1.5 to the former 1.4 format. 2) Replaces compiler generated calls into the new 1.5 runtime with calls into RetroWeaver's replacement runtime.


Field Summary
protected static java.io.FileFilter classFilter
           
protected static Attribute[] CUSTOM_ATTRIBUTES
           
protected static java.io.FileFilter subdirFilter
           
 
Constructor Summary
RetroWeaver(int target)
           
 
Method Summary
 void addNameSpaces(java.util.List<NameSpace> nameSpaces)
           
protected static void buildFileSets(java.util.ArrayList<java.io.File[]> fileSets, java.io.File path)
           
static java.lang.String getUsage()
           
static void main(java.lang.String[] args)
           
 void setLazy(boolean lazy)
           
 void setListener(WeaveListener listener)
           
 void setStripAttributes(boolean stripAttributes)
           
 void setStripSignatures(boolean stripSignatures)
           
 void setVerifier(RefVerifier verifier)
           
 void weave(java.io.File path)
           
 void weave(java.io.File[] baseDirs, java.lang.String[][] fileSets, java.io.File outputDir)
           
protected  boolean weave(java.io.InputStream sourceStream, java.lang.String fileName, java.io.ByteArrayOutputStream bos)
           
 void weave(java.lang.String sourcePath, java.lang.String outputPath)
           
 void weaveJarFile(java.lang.String sourceJarFileName, java.lang.String destJarFileName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classFilter

protected static final java.io.FileFilter classFilter

subdirFilter

protected static final java.io.FileFilter subdirFilter

CUSTOM_ATTRIBUTES

protected static final Attribute[] CUSTOM_ATTRIBUTES
Constructor Detail

RetroWeaver

public RetroWeaver(int target)
Method Detail

buildFileSets

protected static void buildFileSets(java.util.ArrayList<java.io.File[]> fileSets,
                                    java.io.File path)

weave

public void weave(java.io.File path)
           throws java.io.IOException
Throws:
java.io.IOException

weave

public void weave(java.io.File[] baseDirs,
                  java.lang.String[][] fileSets,
                  java.io.File outputDir)
           throws java.io.IOException
Throws:
java.io.IOException

weaveJarFile

public void weaveJarFile(java.lang.String sourceJarFileName,
                         java.lang.String destJarFileName)
                  throws java.io.IOException
Throws:
java.io.IOException

weave

public void weave(java.lang.String sourcePath,
                  java.lang.String outputPath)
           throws java.io.IOException
Throws:
java.io.IOException

weave

protected boolean weave(java.io.InputStream sourceStream,
                        java.lang.String fileName,
                        java.io.ByteArrayOutputStream bos)
                 throws java.io.IOException
Throws:
java.io.IOException

setListener

public void setListener(WeaveListener listener)

setLazy

public void setLazy(boolean lazy)

setVerifier

public void setVerifier(RefVerifier verifier)

getUsage

public static java.lang.String getUsage()

main

public static void main(java.lang.String[] args)

setStripSignatures

public void setStripSignatures(boolean stripSignatures)
Parameters:
stripSignatures - The stripSignatures to set.

setStripAttributes

public void setStripAttributes(boolean stripAttributes)
Parameters:
stripAttributes - the stripAttributes to set

addNameSpaces

public void addNameSpaces(java.util.List<NameSpace> nameSpaces)