Enum ClassLoadersHolder.ClassLoadingProgress

  • All Implemented Interfaces:
    Serializable, Comparable<ClassLoadersHolder.ClassLoadingProgress>
    Enclosing class:
    ClassLoadersHolder

    public static enum ClassLoadersHolder.ClassLoadingProgress
    extends Enum<ClassLoadersHolder.ClassLoadingProgress>
    Class loading progress of each MPS-loadable module. Module lifecycle: At first the module is UNLOADED. It comes to repository and a call of ClassLoaderManager.preLoadModules(Iterable, org.jetbrains.mps.openapi.util.ProgressMonitor) happens. Then we check whether the module's dependencies are valid to load (and some other conditions). If everything is okay then we send broadcast notification to the clients of DeployListener. The state of module is changed to LAZY_LOADED at that moment. When the classes of module are requested [through #getClass(), #getOwnClass(), #getClassLoader()] methods, the actual ClassLoader construction happens and then the module is marked as LOADED. LAZY_LOADED state could not be skipped. When #reloadModules happens, module ClassLoader's are unloaded and then preLoaded (!) again. [back to lazy state again] So the state diagram looks like this: UNLOADED -> LAZY_LOADED -> LOADED LAZY_LOADED -> UNLOADED LOADED -> UNLOADED
    • Method Detail

      • values

        public static ClassLoadersHolder.ClassLoadingProgress[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ClassLoadersHolder.ClassLoadingProgress c : ClassLoadersHolder.ClassLoadingProgress.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ClassLoadersHolder.ClassLoadingProgress valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null