Interface DevelopmentClassLoader


public interface DevelopmentClassLoader
Interface for class loaders that support development mode detection.

This interface is implemented by class loaders used during plugin development to indicate whether the current execution environment is a development or production environment. This allows plugins to adjust their behavior accordingly, such as enabling additional logging or debug features.

Example usage:


 public void startUp() {
     ClassLoader classLoader = getClass().getClassLoader();
     if (classLoader instanceof DevelopmentClassLoader) {
         if (((DevelopmentClassLoader) classLoader).isDevelopment()) {
             log.info("Running in development mode");
             enableDebugFeatures();
         }
     }
 }
 

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks if the current environment is a development environment.
  • Method Details

    • isDevelopment

      boolean isDevelopment()
      Checks if the current environment is a development environment.

      When true, the code is running in a development context (e.g., IDE or local testing). When false, the code is running in production.

      Returns:
      true if running in development mode, false for production