Package io.jmix.core

Class ClassManager

java.lang.Object
io.jmix.core.ClassManager

@Component("core_ClassManager") public class ClassManager extends Object
Loads classes taking into account hot-deploy feature.
  • Field Details

  • Constructor Details

    • ClassManager

      public ClassManager()
  • Method Details

    • findClass

      @Nullable public Class<?> findClass(String className)
      Finds class by name and loads if found
      Parameters:
      className - fully qualified class name
      Returns:
      class or null if not found
    • loadClass

      public Class<?> loadClass(String className)
      Loads a class by name
      Parameters:
      className - fully qualified class name
      Returns:
      class
      Throws:
      IllegalStateException - if the class is not found
    • removeClass

      public boolean removeClass(String className)
      Remove compiled class from cache
      Returns:
      true if class removed from cache
    • reloadClass

      public Class<?> reloadClass(String className)
      Reloads class by name
      Parameters:
      className - fully qualified class name
      Returns:
      class or null if not found
    • clearCache

      public void clearCache()
      Clears compiled classes cache
    • getJavaClassLoader

      public JavaClassLoader getJavaClassLoader()