Class JavaHotCodeReplaceProvider

java.lang.Object
com.microsoft.java.debug.plugin.internal.JavaHotCodeReplaceProvider
All Implemented Interfaces:
com.microsoft.java.debug.core.adapter.IHotCodeReplaceProvider, com.microsoft.java.debug.core.adapter.IProvider, EventListener, org.eclipse.core.resources.IResourceChangeListener

public class JavaHotCodeReplaceProvider extends Object implements com.microsoft.java.debug.core.adapter.IHotCodeReplaceProvider, org.eclipse.core.resources.IResourceChangeListener
The hot code replace provider listens for changes to class files and notifies the running debug session of the changes.
  • Constructor Details

    • JavaHotCodeReplaceProvider

      public JavaHotCodeReplaceProvider()
  • Method Details

    • initialize

      public void initialize(com.microsoft.java.debug.core.adapter.IDebugAdapterContext context, Map<String,Object> options)
      Specified by:
      initialize in interface com.microsoft.java.debug.core.adapter.IProvider
    • close

      public void close()
      Specified by:
      close in interface com.microsoft.java.debug.core.adapter.IProvider
    • resourceChanged

      public void resourceChanged(org.eclipse.core.resources.IResourceChangeEvent event)
      Specified by:
      resourceChanged in interface org.eclipse.core.resources.IResourceChangeListener
    • onClassRedefined

      public void onClassRedefined(Consumer<List<String>> consumer)
      Specified by:
      onClassRedefined in interface com.microsoft.java.debug.core.adapter.IHotCodeReplaceProvider
    • redefineClasses

      public CompletableFuture<List<String>> redefineClasses()
      Specified by:
      redefineClasses in interface com.microsoft.java.debug.core.adapter.IHotCodeReplaceProvider
    • getEventHub

      public io.reactivex.Observable<com.microsoft.java.debug.core.adapter.HotCodeReplaceEvent> getEventHub()
      Specified by:
      getEventHub in interface com.microsoft.java.debug.core.adapter.IHotCodeReplaceProvider
    • popStackFrame

      protected void popStackFrame(StackFrame frame) throws com.microsoft.java.debug.core.DebugException
      Throws:
      com.microsoft.java.debug.core.DebugException
    • dropToStackFrame

      protected void dropToStackFrame(StackFrame frame) throws com.microsoft.java.debug.core.DebugException
      Throws:
      com.microsoft.java.debug.core.DebugException
    • findElement

      public static org.eclipse.jdt.core.IJavaElement findElement(String qualifiedTypeName, org.eclipse.jdt.core.IJavaProject project) throws org.eclipse.core.runtime.CoreException
      Returns the class file or compilation unit containing the given fully qualified name in the specified project. All registered java like file extensions are considered.
      Parameters:
      qualifiedTypeName - fully qualified type name
      project - project to search in
      Returns:
      class file or compilation unit or null
      Throws:
      org.eclipse.core.runtime.CoreException - if an exception occurs