public static class ClassFileLocator.Simple extends Object implements ClassFileLocator
ClassFileLocator.AgentBased, ClassFileLocator.Compound, ClassFileLocator.ForClassLoader, ClassFileLocator.ForFolder, ClassFileLocator.ForJarFile, ClassFileLocator.ForModule, ClassFileLocator.ForModuleFile, ClassFileLocator.NoOp, ClassFileLocator.PackageDiscriminating, ClassFileLocator.Resolution, ClassFileLocator.SimpleCLASS_FILE_EXTENSION| Constructor and Description |
|---|
Simple(Map<String,byte[]> classFiles)
Creates a new simple class file locator.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
ClassFileLocator.Resolution |
locate(String typeName)
Locates the class file for a given type and returns the binary data of the class file.
|
static ClassFileLocator |
of(DynamicType dynamicType)
Creates a class file locator that represents all types of a dynamic type.
|
static ClassFileLocator |
of(Map<TypeDescription,byte[]> binaryRepresentations)
Creates a class file locator that represents all types of a dynamic type.
|
static ClassFileLocator |
of(String typeName,
byte[] binaryRepresentation)
Creates a class file locator for a single known type.
|
static ClassFileLocator |
of(String typeName,
byte[] binaryRepresentation,
ClassFileLocator fallback)
Creates a class file locator for a single known type with an additional fallback locator.
|
public static ClassFileLocator of(String typeName, byte[] binaryRepresentation)
typeName - The name of the type.binaryRepresentation - The binary representation of the type.public static ClassFileLocator of(String typeName, byte[] binaryRepresentation, ClassFileLocator fallback)
typeName - The name of the type.binaryRepresentation - The binary representation of the type.fallback - The class file locator to query in case that a lookup triggers any other type.public static ClassFileLocator of(DynamicType dynamicType)
dynamicType - The dynamic type to represent.public static ClassFileLocator of(Map<TypeDescription,byte[]> binaryRepresentations)
binaryRepresentations - The binary representation of all types.public ClassFileLocator.Resolution locate(String typeName)
ClassFileLocatorlocate in interface ClassFileLocatortypeName - The name of the type to locate a class file representation for.public void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2014–2018. All rights reserved.