# Uses of Class
javassist.bytecode.ClassFile

Packages that use ClassFile
Package
Description
javassist
The Javassist Core API.
javassist.bytecode
Bytecode-level API.
javassist.tools.reflect
Runtime Behavioral Reflection.
javassist.util.proxy
Dynamic proxy (similar to `Enhancer` of cglib).

## Uses of ClassFile in javassist

Methods in javassist that return ClassFile
Modifier and Type
Method
Description
`ClassFile`
CtClass.`getClassFile()`
Returns a class file for this class.
`ClassFile`
CtClass.`getClassFile2()`
Returns a class file for this class (read only).
Methods in javassist with parameters of type ClassFile
Modifier and Type
Method
Description
`CtClass`
ClassPool.`makeClass(ClassFile classfile)`
Creates a new class (or interface) from the given class file.
`CtClass`
ClassPool.`makeClass(ClassFile classfile, boolean ifNotFrozen)`
Creates a new class (or interface) from the given class file.

## Uses of ClassFile in javassist.bytecode

Methods in javassist.bytecode with parameters of type ClassFile
Modifier and Type
Method
Description
`static void`
ClassFilePrinter.`print(ClassFile cf)`
Prints the contents of a class file to the standard output stream.
`static void`
ClassFilePrinter.`print(ClassFile cf, PrintWriter out)`
Prints the contents of a class file.
`void`
MethodInfo.`rebuildStackMapIf6(ClassPool pool, ClassFile cf)`
Rebuilds a stack map table if the class file is for Java 6 or later.

## Uses of ClassFile in javassist.tools.reflect

Methods in javassist.tools.reflect with parameters of type ClassFile
Modifier and Type
Method
Description
`void`
Reflection.`rebuildClassFile(ClassFile cf)`

## Uses of ClassFile in javassist.util.proxy

Methods in javassist.util.proxy with parameters of type ClassFile
Modifier and Type
Method
Description
`static Class<?>`
FactoryHelper.`toClass(ClassFile cf, Class<?> neighbor, ClassLoader loader, ProtectionDomain domain)`
Loads a class file by a given class loader.
`static Class<?>`
FactoryHelper.`toClass(ClassFile cf, ClassLoader loader)`
Deprecated.
`static Class<?>`
FactoryHelper.`toClass(ClassFile cf, ClassLoader loader, ProtectionDomain domain)`
Deprecated.
`static Class<?>`
FactoryHelper.`toClass(ClassFile cf, MethodHandles.Lookup lookup)`
Loads a class file by a given lookup.
`static void`
FactoryHelper.`writeFile(ClassFile cf, String directoryName)`
Writes a class file.