Interface GeneratedService.Descriptor<T>

Type Parameters:
T - type of the described service
All Superinterfaces:
Comparable<Weighted>, ServiceInfo, Weighted
Enclosing class:
GeneratedService

public static interface GeneratedService.Descriptor<T> extends ServiceInfo
A descriptor of a service. In addition to providing service metadata, this also allows instantiation of the service instance, with dependent services as parameters.
  • Method Details

    • instantiate

      default Object instantiate(DependencyContext ctx)
      Create a new service instance.
      Parameters:
      ctx - dependency context with all dependencies of this service
      Returns:
      a new instance, must be of the type T or a subclass