Package net.bytebuddy.dynamic
Interface ClassFileLocator
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Subinterfaces:
DynamicType
,DynamicType.Loaded<T>
,DynamicType.Unloaded<T>
- All Known Implementing Classes:
ClassFileLocator.Compound
,ClassFileLocator.Filtering
,ClassFileLocator.ForClassLoader
,ClassFileLocator.ForClassLoader.WeaklyReferenced
,ClassFileLocator.ForFolder
,ClassFileLocator.ForInstrumentation
,ClassFileLocator.ForJarFile
,ClassFileLocator.ForModule
,ClassFileLocator.ForModule.WeaklyReferenced
,ClassFileLocator.ForModuleFile
,ClassFileLocator.ForUrl
,ClassFileLocator.NoOp
,ClassFileLocator.PackageDiscriminating
,ClassFileLocator.Simple
,DynamicType.Default
,DynamicType.Default.Loaded
,DynamicType.Default.Unloaded
Locates a class file or its byte array representation when it is given its type description.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
A compoundClassFileLocator
that chains several locators.static class
A class file locator that only applies for matched names.static class
A class file locator that queries a class loader for binary representations of class files.static class
A class file locator that finds files from a standardized Java folder structure with folders donating packages and class files being saved as<classname>.class
files within their package folder.static class
A Java agent that allows the location of class files by emulating a retransformation.static class
A class file locator that locates classes within a Java jar file.static class
A class file locator that locates class files by querying a Java module'sgetResourceAsStream
method.static class
A class file locator that locates classes within a Java jmod file.static class
A class file locator that reads class files from one or several URLs.static enum
A class file locator that cannot locate any class files.static class
A class file locator that discriminates by a type's package.static interface
Represents a class file as binary data.static class
A simple class file locator that returns class files from a selection of given types. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionLocates the class file for a given type and returns the binary data of the class file.
-
Field Details
-
CLASS_FILE_EXTENSION
The file extension for a Java class file.- See Also:
-
-
Method Details
-
locate
Locates the class file for a given type and returns the binary data of the class file.- Parameters:
name
- The name of the type to locate a class file representation for.- Returns:
- Any binary representation of the type which might be illegal.
- Throws:
IOException
- If reading a class file causes an error.
-