Interface ClassFileLocator

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
ClassFileLocator.Compound, 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

public interface ClassFileLocator extends Closeable
Locates a class file or its byte array representation when it is given its type description.
  • Field Details

    • CLASS_FILE_EXTENSION

      static final String 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.