Interface ServiceInfo

All Superinterfaces:
Comparable<Weighted>, Weighted
All Known Subinterfaces:
ServiceDescriptor<T>
All Known Implementing Classes:
ExistingInstanceDescriptor, VirtualDescriptor

public interface ServiceInfo extends Weighted
Service metadata.
  • Method Details

    • serviceType

      TypeName serviceType()
      Type of the service this descriptor describes.
      Returns:
      service type
    • providedType

      default TypeName providedType()
      The type that implements contracts(). If the described service is not a factory, this will be the serviceType(). If the described service is a factory, this will be the type in its factory declaration, i.e. the type it supplies, or the type of the services factory.
      Returns:
      type this service provides; this may be an interface, or an implementation, the type will implement all contracts() of this service
    • descriptorType

      TypeName descriptorType()
      Type of the service descriptor (usually generated).
      Returns:
      descriptor type
    • contracts

      default Set<ResolvedType> contracts()
      Set of contracts the described service implements or provides through a factory method.
      Returns:
      set of contracts
    • factoryContracts

      default Set<ResolvedType> factoryContracts()
      Set of contracts the described service implements directly. If the service is not a factory, this set is empty.
      Returns:
      set of factory contracts
    • dependencies

      default List<Dependency> dependencies()
      List of dependencies required by this service. These may be injection points as constructor parameters, fields, or setter methods.
      Returns:
      required dependencies
    • isAbstract

      default boolean isAbstract()
      Returns true for abstract classes and interfaces, returns false by default.
      Returns:
      whether this descriptor describes an abstract class or interface
    • qualifiers

      default Set<Qualifier> qualifiers()
      Service qualifiers.
      Returns:
      qualifiers
    • runLevel

      default Optional<Double> runLevel()
      Run level of this service.
      Returns:
      run level
    • scope

      TypeName scope()
      Scope of this service.
      Returns:
      scope of the service
    • factoryType

      default FactoryType factoryType()
      What factory type is the described service. Inject services can be any of the types in the enum.
      Returns:
      factory type