Interface DescriptorMetadata

All Known Subinterfaces:
DescriptorHandler

public interface DescriptorMetadata
Metadata of a service descriptor, as stored in Helidon specific file "META-INF/helidon/service-registry.json".
  • Method Details

    • create

      static DescriptorMetadata create(TypeName descriptor, double weight, Set<ResolvedType> contracts, Set<ResolvedType> factoryContracts)
      Create a new instance from descriptor information, i.e. when code generating the descriptor metadata.
      Parameters:
      descriptor - type of the service descriptor (the generated file from helidon-service-codegen)
      weight - weight of the service descriptor
      contracts - contracts the service implements
      factoryContracts - factory contracts the service instance implements
      Returns:
      a new descriptor metadata instance
    • descriptorType

      TypeName descriptorType()
      Descriptor type name.
      Returns:
      descriptor type
    • contracts

      Set<ResolvedType> contracts()
      Contracts of the service.
      Returns:
      contracts the service implements/provides.
    • factoryContracts

      Set<ResolvedType> factoryContracts()
      Contracts of the factory service, if this describes a factory, empty otherwise.
      Returns:
      factory contracts
    • weight

      double weight()
      Weight of the service.
      Returns:
      service weight
      See Also:
    • toHson

      Hson.Struct toHson()
      Create the metadata in Helidon metadata format. This is used by components that store the metadata.
      Returns:
      HSON object (similar to JSON)