Class ClassFileLoader

java.lang.Object
de.inetsoftware.jwebassembly.module.ClassFileLoader

public class ClassFileLoader extends Object
Cache and manager for the loaded ClassFiles
Author:
Volker Berlin
  • Constructor Details

    • ClassFileLoader

      public ClassFileLoader(ClassLoader loader)
      Create a new instance
      Parameters:
      loader - the classloader to find the *.class files
  • Method Details

    • get

      @Nullable public ClassFile get(String className) throws IOException
      Get the ClassFile from cache or load it.
      Parameters:
      className - the class name like "java/lang/Object"
      Returns:
      the ClassFile or null
      Throws:
      IOException - If any I/O error occur
    • cache

      public void cache(@Nonnull ClassFile classFile)
      Add a class file to the weak cache.
      Parameters:
      classFile - the class file