Interface ModuleAgent


public interface ModuleAgent
Interface for a class that brokers a class loader instance which is capable of loading public classes.

Usage: specialistsBroker.requireSpecialist(ModuleAgent.TYPE).getClassLoader().

Since:
4.2.404
  • Field Details

  • Method Details

    • getClassLoader

      @NotNull ClassLoader getClassLoader()
      Returns a class loader instance which is capable of loading all global module classes.
      Returns:
      A class loader instance which is capable of loading all global module classes.
      Since:
      4.2.404
    • getComponents

      @NotNull Collection<ComponentDescriptor> getComponents(Class<?> type)
      Returns all components which implements or extends the given type.
      Parameters:
      type - The requested type.
      Returns:
      A collection of matching descriptors.
      Since:
      4.2.404
    • getTypeForName

      @Nullable <T> Class<? extends T> getTypeForName(String name, Class<T> type)
      Returns the exported class that matches the given interface type and name. Returns null if no match is found.
      Parameters:
      name - name to match
      type - interface to match
      Returns:
      The exported class matching the given parameters or null if there is no matching exported class
      Throws:
      IllegalStateException - if loading of the exported class fails.
      Since:
      4.2.404