Interface HotSwapListener

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface HotSwapListener
Listener for class hot-swap events 类热替换事件监听器

Functional interface that receives notifications when a class is hot-swapped to a new version.

函数式接口,当类被热替换为新版本时接收通知。

Since:
JDK 25, opencode-base-classloader V1.0.3
Author:
Leon Soo www.LeonSoo.com
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onSwap(String className, int oldVersion, int newVersion)
    Called when a class is hot-swapped 当类被热替换时调用
  • Method Details

    • onSwap

      void onSwap(String className, int oldVersion, int newVersion)
      Called when a class is hot-swapped 当类被热替换时调用
      Parameters:
      className - class name | 类名
      oldVersion - old version number | 旧版本号
      newVersion - new version number | 新版本号