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 classBridger.TranslatingClassVisitor
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.atomic.AtomicIntegertransformedMethodCallCountprivate java.util.concurrent.atomic.AtomicIntegertransformedMethodCount
-
Constructor Summary
Constructors Constructor Description Bridger()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voiddoAccept(org.objectweb.asm.ClassWriter classWriter, org.objectweb.asm.ClassReader classReader)intgetTransformedMethodCallCount()intgetTransformedMethodCount()static voidmain(java.lang.String[] args)Translate all.classfiles in the given list of files and directories.private static voidsafeClose(java.io.Closeable closeable)byte[]transform(java.io.InputStream input)voidtransform(java.io.InputStream input, java.io.OutputStream output)voidtransform(java.io.RandomAccessFile file)byte[]transform(java.lang.ClassLoader loader, java.lang.String className, java.lang.Class<?> classBeingRedefined, java.security.ProtectionDomain protectionDomain, byte[] classfileBuffer)voidtransformRecursive(java.io.File... files)Translate all.classfiles in the given list of files and directories.voidtransformRecursive(java.lang.String... names)Translate all.classfiles in the given list of files and directories.
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
Translate all.classfiles 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.classfiles 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.classfiles 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:
transformin 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.IllegalClassFormatExceptionjava.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.IllegalClassFormatExceptionjava.io.IOException
-
transform
public void transform(java.io.RandomAccessFile file) throws java.lang.instrument.IllegalClassFormatException, java.io.IOException- Throws:
java.lang.instrument.IllegalClassFormatExceptionjava.io.IOException
-
safeClose
private static void safeClose(java.io.Closeable closeable)
-
-