Interface PluginClasspathBuilder


@Experimental @NullMarked @NonExtendable public interface PluginClasspathBuilder
A mutable builder that may be used to collect and register all ClassPathLibrary instances a PluginLoader aims to provide to its plugin at runtime.
  • Method Details

    • addLibrary

      @Contract("_ -> this") PluginClasspathBuilder addLibrary(ClassPathLibrary classPathLibrary)
      Adds a new classpath library to this classpath builder.

      As a builder, this method does not invoke ClassPathLibrary.register(LibraryStore) and may hence be run without invoking potential IO performed by a ClassPathLibrary during resolution.

      The paper api provides pre implemented ClassPathLibrary types that allow easy inclusion of existing libraries on disk or on remote maven repositories.

      Parameters:
      classPathLibrary - the library instance to add to this builder
      Returns:
      self
      See Also:
    • addLibraryBeforeCreateInstance

      @Contract("_ -> this") PluginClasspathBuilder addLibraryBeforeCreateInstance(URL url)
      플러그인 인스턴스를 생성하기 전에 등록할 클래스 경로를 추가합니다.
      Parameters:
      url - 클래스 경로
      Returns:
      self
    • getContext

      PluginProviderContext getContext()