Package org.jboss.bridger
Class Bridger
- java.lang.Object
-
- org.jboss.bridger.Bridger
-
- All Implemented Interfaces:
java.lang.instrument.ClassFileTransformer
public final class Bridger extends java.lang.Object implements java.lang.instrument.ClassFileTransformer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
Bridger.TranslatingClassVisitor
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.atomic.AtomicInteger
transformedMethodCallCount
private java.util.concurrent.atomic.AtomicInteger
transformedMethodCount
-
Constructor Summary
Constructors Constructor Description Bridger()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
doAccept(org.objectweb.asm.ClassWriter classWriter, org.objectweb.asm.ClassReader classReader)
int
getTransformedMethodCallCount()
int
getTransformedMethodCount()
static void
main(java.lang.String[] args)
Translate all.class
files in the given list of files and directories.private static void
safeClose(java.io.Closeable closeable)
byte[]
transform(java.io.InputStream input)
void
transform(java.io.InputStream input, java.io.OutputStream output)
void
transform(java.io.RandomAccessFile file)
byte[]
transform(java.lang.ClassLoader loader, java.lang.String className, java.lang.Class<?> classBeingRedefined, java.security.ProtectionDomain protectionDomain, byte[] classfileBuffer)
void
transformRecursive(java.io.File... files)
Translate all.class
files in the given list of files and directories.void
transformRecursive(java.lang.String... names)
Translate all.class
files in the given list of files and directories.
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
Translate all.class
files in the given list of files and directories.- Parameters:
args
- the file and directory names
-
transformRecursive
public void transformRecursive(java.lang.String... names)
Translate all.class
files in the given list of files and directories.- Parameters:
names
- the file and directory names
-
transformRecursive
public void transformRecursive(java.io.File... files)
Translate all.class
files in the given list of files and directories.- Parameters:
files
- the files and directories
-
transform
public byte[] transform(java.lang.ClassLoader loader, java.lang.String className, java.lang.Class<?> classBeingRedefined, java.security.ProtectionDomain protectionDomain, byte[] classfileBuffer) throws java.lang.instrument.IllegalClassFormatException
- Specified by:
transform
in interfacejava.lang.instrument.ClassFileTransformer
- Throws:
java.lang.instrument.IllegalClassFormatException
-
transform
public byte[] transform(java.io.InputStream input) throws java.lang.instrument.IllegalClassFormatException, java.io.IOException
- Throws:
java.lang.instrument.IllegalClassFormatException
java.io.IOException
-
getTransformedMethodCount
public int getTransformedMethodCount()
-
getTransformedMethodCallCount
public int getTransformedMethodCallCount()
-
doAccept
private void doAccept(org.objectweb.asm.ClassWriter classWriter, org.objectweb.asm.ClassReader classReader) throws java.lang.instrument.IllegalClassFormatException
- Throws:
java.lang.instrument.IllegalClassFormatException
-
transform
public void transform(java.io.InputStream input, java.io.OutputStream output) throws java.lang.instrument.IllegalClassFormatException, java.io.IOException
- Throws:
java.lang.instrument.IllegalClassFormatException
java.io.IOException
-
transform
public void transform(java.io.RandomAccessFile file) throws java.lang.instrument.IllegalClassFormatException, java.io.IOException
- Throws:
java.lang.instrument.IllegalClassFormatException
java.io.IOException
-
safeClose
private static void safeClose(java.io.Closeable closeable)
-
-