All Known Implementing Classes:
DefaultClassResolver

public interface ClassResolver
A resolver of Java classes.
Author:
Steve Ebersole, Hardy Ferentschik
  • Method Details

    • classForName

      Class<?> classForName(String className)
      Locate a class by name.
      Parameters:
      className - The name of the class to locate
      Returns:
      The class reference
      Throws:
      ClassLoadingException - Indicates the class could not be found
    • packageForName

      @Incubating Package packageForName(String packageName)
      Locate a pacakge by name.
      Parameters:
      packageName - The name of the package to locate
      Returns:
      The package reference
      Throws:
      ClassLoadingException - Indicates the class could not be found
    • locateResource

      @Incubating URL locateResource(String resourceName)
      Locate a resource by name
      Parameters:
      resourceName - The name of the resource to resolve
      Returns:
      The located resource; may return null to indicate the resource was not found
    • loadJavaServices

      @Incubating <S> Collection<S> loadJavaServices(Class<S> serviceType)
      Discovers and instantiates implementations of the given Java service contract.
      Type Parameters:
      S - The type of the service contract
      Parameters:
      serviceType - The java type defining the service contract
      Returns:
      The ordered set of discovered services.