Class ModuleTypeInfo.BuilderBase<BUILDER extends ModuleTypeInfo.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ModuleTypeInfo>

java.lang.Object
io.helidon.common.types.ModuleTypeInfo.BuilderBase<BUILDER,PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
ModuleTypeInfo.Builder
Enclosing interface:
ModuleTypeInfo

public abstract static class ModuleTypeInfo.BuilderBase<BUILDER extends ModuleTypeInfo.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ModuleTypeInfo> extends Object implements Prototype.Builder<BUILDER,PROTOTYPE>
Fluent API builder base for ModuleTypeInfo.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(ModuleTypeInfo prototype)
      Update this builder from an existing prototype instance. This method disables automatic service discovery.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(ModuleTypeInfo.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • name

      public BUILDER name(String name)
      Module name.
      Parameters:
      name - name of this module
      Returns:
      updated builder instance
      See Also:
    • clearDescription

      public BUILDER clearDescription()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • description

      public BUILDER description(String description)
      Description, such as javadoc, if available.
      Parameters:
      description - description of this element
      Returns:
      updated builder instance
      See Also:
    • isOpen

      public BUILDER isOpen(boolean isOpen)
      Whether this is an open module.
      Parameters:
      isOpen - if open
      Returns:
      updated builder instance
      See Also:
    • requires

      public BUILDER requires(List<? extends ModuleInfoRequires> requires)
      List of requires directives.
      Parameters:
      requires - requires
      Returns:
      updated builder instance
      See Also:
    • addRequires

      public BUILDER addRequires(List<? extends ModuleInfoRequires> requires)
      List of requires directives.
      Parameters:
      requires - requires
      Returns:
      updated builder instance
      See Also:
    • addRequire

      public BUILDER addRequire(ModuleInfoRequires require)
      List of requires directives.
      Parameters:
      require - requires
      Returns:
      updated builder instance
      See Also:
    • addRequire

      public BUILDER addRequire(Consumer<ModuleInfoRequires.Builder> consumer)
      List of requires directives.
      Parameters:
      consumer - requires
      Returns:
      updated builder instance
      See Also:
    • exports

      public BUILDER exports(List<? extends ModuleInfoExports> exports)
      List of exports directives.
      Parameters:
      exports - exports
      Returns:
      updated builder instance
      See Also:
    • addExports

      public BUILDER addExports(List<? extends ModuleInfoExports> exports)
      List of exports directives.
      Parameters:
      exports - exports
      Returns:
      updated builder instance
      See Also:
    • addExport

      public BUILDER addExport(ModuleInfoExports export)
      List of exports directives.
      Parameters:
      export - exports
      Returns:
      updated builder instance
      See Also:
    • addExport

      public BUILDER addExport(Consumer<ModuleInfoExports.Builder> consumer)
      List of exports directives.
      Parameters:
      consumer - exports
      Returns:
      updated builder instance
      See Also:
    • opens

      public BUILDER opens(List<? extends ModuleInfoOpens> opens)
      List of opens directives.
      Parameters:
      opens - opens
      Returns:
      updated builder instance
      See Also:
    • addOpens

      public BUILDER addOpens(List<? extends ModuleInfoOpens> opens)
      List of opens directives.
      Parameters:
      opens - opens
      Returns:
      updated builder instance
      See Also:
    • addOpen

      public BUILDER addOpen(ModuleInfoOpens open)
      List of opens directives.
      Parameters:
      open - opens
      Returns:
      updated builder instance
      See Also:
    • addOpen

      public BUILDER addOpen(Consumer<ModuleInfoOpens.Builder> consumer)
      List of opens directives.
      Parameters:
      consumer - opens
      Returns:
      updated builder instance
      See Also:
    • uses

      public BUILDER uses(List<? extends ModuleInfoUses> uses)
      List of uses directives.
      Parameters:
      uses - uses
      Returns:
      updated builder instance
      See Also:
    • addUses

      public BUILDER addUses(List<? extends ModuleInfoUses> uses)
      List of uses directives.
      Parameters:
      uses - uses
      Returns:
      updated builder instance
      See Also:
    • addUse

      public BUILDER addUse(ModuleInfoUses use)
      List of uses directives.
      Parameters:
      use - uses
      Returns:
      updated builder instance
      See Also:
    • addUse

      public BUILDER addUse(Consumer<ModuleInfoUses.Builder> consumer)
      List of uses directives.
      Parameters:
      consumer - uses
      Returns:
      updated builder instance
      See Also:
    • provides

      public BUILDER provides(List<? extends ModuleInfoProvides> provides)
      List of provides directives.
      Parameters:
      provides - provides
      Returns:
      updated builder instance
      See Also:
    • addProvides

      public BUILDER addProvides(List<? extends ModuleInfoProvides> provides)
      List of provides directives.
      Parameters:
      provides - provides
      Returns:
      updated builder instance
      See Also:
    • addProvide

      public BUILDER addProvide(ModuleInfoProvides provide)
      List of provides directives.
      Parameters:
      provide - provides
      Returns:
      updated builder instance
      See Also:
    • addProvide

      public BUILDER addProvide(Consumer<ModuleInfoProvides.Builder> consumer)
      List of provides directives.
      Parameters:
      consumer - provides
      Returns:
      updated builder instance
      See Also:
    • clearOriginatingElement

      public BUILDER clearOriginatingElement()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • originatingElement

      public BUILDER originatingElement(Object originatingElement)
      The element used to create this instance. The type of the object depends on the environment we are in - it may be an TypeElement in annotation processing, or a ClassInfo when using classpath scanning.
      Parameters:
      originatingElement - originating element
      Returns:
      updated builder instance
      See Also:
    • annotations

      public BUILDER annotations(List<? extends Annotation> annotations)
      List of declared and known annotations for this element. Note that "known" implies that the annotation is visible, which depends upon the context in which it was build (such as the of the annotation).
      Parameters:
      annotations - the list of annotations declared on this element
      Returns:
      updated builder instance
      See Also:
    • addAnnotations

      public BUILDER addAnnotations(List<? extends Annotation> annotations)
      List of declared and known annotations for this element. Note that "known" implies that the annotation is visible, which depends upon the context in which it was build (such as the of the annotation).
      Parameters:
      annotations - the list of annotations declared on this element
      Returns:
      updated builder instance
      See Also:
    • addAnnotation

      public BUILDER addAnnotation(Annotation annotation)
      List of declared and known annotations for this element. Note that "known" implies that the annotation is visible, which depends upon the context in which it was build (such as the of the annotation).
      Parameters:
      annotation - the list of annotations declared on this element
      Returns:
      updated builder instance
      See Also:
    • addAnnotation

      public BUILDER addAnnotation(Consumer<Annotation.Builder> consumer)
      List of declared and known annotations for this element. Note that "known" implies that the annotation is visible, which depends upon the context in which it was build (such as the of the annotation).
      Parameters:
      consumer - the list of annotations declared on this element
      Returns:
      updated builder instance
      See Also:
    • inheritedAnnotations

      public BUILDER inheritedAnnotations(List<? extends Annotation> inheritedAnnotations)
      List of all inherited annotations for this element. Inherited annotations are annotations declared on annotations of this element that are also marked as Inherited.

      The returned list does not contain annotations(). If a meta-annotation is present on multiple annotations, it will be returned once for each such declaration.

      This method does not return annotations on super types or interfaces!

      Parameters:
      inheritedAnnotations - list of all meta annotations of this element
      Returns:
      updated builder instance
      See Also:
    • addInheritedAnnotations

      public BUILDER addInheritedAnnotations(List<? extends Annotation> inheritedAnnotations)
      List of all inherited annotations for this element. Inherited annotations are annotations declared on annotations of this element that are also marked as Inherited.

      The returned list does not contain annotations(). If a meta-annotation is present on multiple annotations, it will be returned once for each such declaration.

      This method does not return annotations on super types or interfaces!

      Parameters:
      inheritedAnnotations - list of all meta annotations of this element
      Returns:
      updated builder instance
      See Also:
    • addInheritedAnnotation

      public BUILDER addInheritedAnnotation(Annotation inheritedAnnotation)
      List of all inherited annotations for this element. Inherited annotations are annotations declared on annotations of this element that are also marked as Inherited.

      The returned list does not contain annotations(). If a meta-annotation is present on multiple annotations, it will be returned once for each such declaration.

      This method does not return annotations on super types or interfaces!

      Parameters:
      inheritedAnnotation - list of all meta annotations of this element
      Returns:
      updated builder instance
      See Also:
    • addInheritedAnnotation

      public BUILDER addInheritedAnnotation(Consumer<Annotation.Builder> consumer)
      List of all inherited annotations for this element. Inherited annotations are annotations declared on annotations of this element that are also marked as Inherited.

      The returned list does not contain annotations(). If a meta-annotation is present on multiple annotations, it will be returned once for each such declaration.

      This method does not return annotations on super types or interfaces!

      Parameters:
      consumer - list of all meta annotations of this element
      Returns:
      updated builder instance
      See Also:
    • name

      public Optional<String> name()
      Module name.
      Returns:
      the name
    • description

      public Optional<String> description()
      Description, such as javadoc, if available.
      Returns:
      the description
    • isOpen

      public boolean isOpen()
      Whether this is an open module.
      Returns:
      the is open
    • requires

      public List<ModuleInfoRequires> requires()
      List of requires directives.
      Returns:
      the requires
    • exports

      public List<ModuleInfoExports> exports()
      List of exports directives.
      Returns:
      the exports
    • opens

      public List<ModuleInfoOpens> opens()
      List of opens directives.
      Returns:
      the opens
    • uses

      public List<ModuleInfoUses> uses()
      List of uses directives.
      Returns:
      the uses
    • provides

      public List<ModuleInfoProvides> provides()
      List of provides directives.
      Returns:
      the provides
    • originatingElement

      public Optional<Object> originatingElement()
      The element used to create this instance. The type of the object depends on the environment we are in - it may be an TypeElement in annotation processing, or a ClassInfo when using classpath scanning.
      Returns:
      the originating element
    • annotations

      public List<Annotation> annotations()
      List of declared and known annotations for this element. Note that "known" implies that the annotation is visible, which depends upon the context in which it was build (such as the of the annotation).
      Returns:
      the annotations
    • inheritedAnnotations

      public List<Annotation> inheritedAnnotations()
      List of all inherited annotations for this element. Inherited annotations are annotations declared on annotations of this element that are also marked as Inherited.

      The returned list does not contain annotations(). If a meta-annotation is present on multiple annotations, it will be returned once for each such declaration.

      This method does not return annotations on super types or interfaces!

      Returns:
      the inherited annotations
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.