Interface IProduction


  • public interface IProduction
    Information about Java classes generated for a collection of Module modules.
    • Method Detail

      • getModuleProduction

        @Nullable
        IGeneratedModuleClass getModuleProduction​(@NonNull
                                                  IModule module)
        Get information about the Java classes generated for the provided Module module.
        Parameters:
        module - the Module module to get information for
        Returns:
        the Java class information for the module or null if this production did not involve generating classes for the provided module
      • getGlobalDefinitionClassesAsStream

        @NonNull
        Stream<IGeneratedDefinitionClassgetGlobalDefinitionClassesAsStream()
        Get a stream of all definition Java classes generated as part of this production.

        This will include each unique class generated for all Module modules associated with this production.

        Returns:
        the stream of generated Java classes
      • getGeneratedClasses

        @NonNull
        Stream<? extends IGeneratedClassgetGeneratedClasses()
        Get a stream of all Java classes generated as part of this production, including module, definition, and package-info classes.
        Returns:
        the stream of generated Java classes
      • of

        @NonNull
        static IProduction of​(@NonNull
                              Collection<? extends IModule> modules,
                              @NonNull
                              ITypeResolver typeResolver,
                              @NonNull
                              Path classDir)
                       throws IOException
        Create a new production for the provided set of Module modules.
        Parameters:
        modules - the Module modules to generate and compile classes for
        typeResolver - the resolve used to determine type names
        classDir - the directory to generate and compile classes in
        Returns:
        the production information
        Throws:
        IOException - if an error occurred while generating or compiling the classes