Class Codegen

java.lang.Object
io.helidon.codegen.Codegen

public class Codegen extends Object
Central piece of code processing and generation. This type loads extension providers, and invokes each CodegenExtension with appropriate types and annotations.
  • Method Details

    • create

      public static Codegen create(CodegenContext ctx, TypeName generator)
      Create a new instance of the top level Codegen. This type discovers all CodegenExtensionProviders and invokes the provided CodegenExtensions as needed.
      Parameters:
      ctx - code processing and generation context
      generator - type name of the invoking generator (such as maven plugin, annotation procesor, command line tool)
      Returns:
      a new codegen instance
    • supportedOptions

      public static Set<Option<?>> supportedOptions()
      Set of supported options by all extensions.
      Returns:
      supported options
    • process

      public void process(List<TypeInfo> allTypes)
      Process all types discovered. This method analyzes the types and invokes each extension with the correct subset.
      Parameters:
      allTypes - all types for this processing round
    • processingOver

      public void processingOver()
      Finish processing. No additional rounds will be done.
    • supportedAnnotations

      public Set<TypeName> supportedAnnotations()
      A set of annotation types.
      Returns:
      set of annotations that should be processed
    • supportedAnnotationPackagePrefixes

      public Set<String> supportedAnnotationPackagePrefixes()
      A set of package prefixes (expected to end with a .).
      Returns:
      set of package prefixes of annotations that should be processed