public class MapClassProvider extends java.lang.Object implements ClassProvider
MapClassProvider.NameFormat.SLASH, MapClassProvider.NameFormat.DOT, MapClassProvider.NameFormat.SLASH_CLASS or MapClassProvider.NameFormat.DOT_CLASS.| Modifier and Type | Class and Description |
|---|---|
static class |
MapClassProvider.NameFormat |
ClassProvider.ClassSupplier| Constructor and Description |
|---|
MapClassProvider(java.util.Map<java.lang.String,byte[]> classes,
MapClassProvider.NameFormat nameFormat) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,ClassProvider.ClassSupplier> |
getAllClasses()
Get a map of all classes that are available in this provider.
Not every implementation has to support this and can throw an UnsupportedOperationException if it is not supported.The key format is "package/Name". |
byte[] |
getClass(java.lang.String name)
Get the bytecode of a class by its name.
The name should be in the format of "package/Name".If the class could not be found, a ClassNotFoundException is thrown. |
java.util.Map<java.lang.String,byte[]> |
getClasses() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getClassNode, thenpublic MapClassProvider(java.util.Map<java.lang.String,byte[]> classes,
MapClassProvider.NameFormat nameFormat)
public java.util.Map<java.lang.String,byte[]> getClasses()
@Nonnull
public byte[] getClass(java.lang.String name)
throws java.lang.ClassNotFoundException
ClassProvider"package/Name".ClassNotFoundException is thrown.getClass in interface ClassProvidername - The name of the classjava.lang.ClassNotFoundException - If the class could not be found@Nonnull public java.util.Map<java.lang.String,ClassProvider.ClassSupplier> getAllClasses()
ClassProviderUnsupportedOperationException if it is not supported."package/Name".getAllClasses in interface ClassProvider