Class ServiceSuperType

java.lang.Object
io.helidon.service.codegen.ServiceSuperType

public final class ServiceSuperType extends Object
Definition of a super service type (if any). Only classes can have super types, and only if they directly extend a class that has a service descriptor generated.
  • Method Details

    • create

      public static ServiceSuperType create(TypeInfo typeInfo, TypeName descriptorTypeName)
      Create a registry based super type.
      Parameters:
      typeInfo - type info of the super type
      descriptorTypeName - type name of the service descriptor of the extended type
      Returns:
      a new super type for a real super type
    • create

      public static ServiceSuperType create()
      Create a super type that represents "no supertype" (i.e. the only supertype is Object).
      Returns:
      super type that is not present
    • present

      public boolean present()
      Whether there is a super service type.
      Returns:
      if this service has a valid service super type
    • empty

      public boolean empty()
      Whether there is NOT a super service type.
      Returns:
      if the service does not have a valid super type
    • typeInfo

      public TypeInfo typeInfo()
      Type information of the super service type of this service.
      Returns:
      type info of the super service type
      Throws:
      IllegalStateException - if this is not a valid super type, guard with present()
    • descriptorType

      public TypeName descriptorType()
      Type name of the service descriptor of the super service type.
      Returns:
      type name of the service descriptor for the super service type
      Throws:
      IllegalStateException - if this is not a valid super type, guard with present()