public interface ClassProvider
extends java.lang.AutoCloseable
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ClassProvider.ClassSupplier |
| Modifier and Type | Method and Description |
|---|---|
default void |
close()
Close the class provider and free all resources.
|
default java.util.Map<java.lang.String,ClassProvider.ClassSupplier> |
getAllClasses()
Get a map of all classes that are available in this provider.
|
byte[] |
getClass(java.lang.String name)
Get the bytecode of a class by its name.
|
default org.objectweb.asm.tree.ClassNode |
getClassNode(java.lang.String name)
Get the bytecode of a class by its name and convert it to a
ClassNode. |
default ClassProvider |
then(ClassProvider... classProviders)
Delegate all missing classes to the given class providers.
|
@Nonnull
byte[] getClass(java.lang.String name)
throws java.lang.ClassNotFoundException
"package/Name".ClassNotFoundException is thrown.name - The name of the classjava.lang.ClassNotFoundException - If the class could not be found@Nonnull default java.util.Map<java.lang.String,ClassProvider.ClassSupplier> getAllClasses() throws java.lang.UnsupportedOperationException
UnsupportedOperationException if it is not supported."package/Name".java.lang.UnsupportedOperationException - If this operation is not supporteddefault void close()
throws java.lang.Exception
close in interface java.lang.AutoCloseablejava.lang.Exception - If an error occurred while closing the class providerdefault org.objectweb.asm.tree.ClassNode getClassNode(java.lang.String name)
throws java.lang.ClassNotFoundException
ClassNode.name - The name of the classjava.lang.ClassNotFoundException - If the class could not be foundgetClass(String)default ClassProvider then(ClassProvider... classProviders)
DelegatingClassProvider.getAllClasses() for more information on the behavior of this method.classProviders - The class providers to delegate toDelegatingClassProvider