Class AbstractAPIGenerator

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractAPIGenerator​(java.lang.String directory)
      Constructs an AbstractAPIGenerator with the given directory.
      protected AbstractAPIGenerator​(java.lang.String directory, boolean optional)
      Constructs an AbstractAPIGenerator with the given directory and optional state.
      protected AbstractAPIGenerator​(java.lang.String directory, boolean optional, java.util.ResourceBundle resourceBundle)
      Constructs an AbstractAPIGenerator with the given directory, optional state, and ResourceBundle.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void generateAPIFiles​(java.util.List<ApiImplementor> implementors)
      Generates the API client files of the given API implementors.
      protected abstract void generateAPIFiles​(ApiImplementor implementor)
      Generates the API client files of the given API implementor.
      void generateCoreAPIFiles()
      Generates the API client files for the core API implementors.
      protected java.nio.file.Path getDirectory()
      Gets the directory where the API client files should be generated.
      protected java.util.ResourceBundle getMessages()
      Gets the messages for doc of the generated classes.
      protected boolean isOptional()
      If the API client files being generated are optional, that is, belong to an add-on.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractAPIGenerator

        protected AbstractAPIGenerator​(java.lang.String directory)
        Constructs an AbstractAPIGenerator with the given directory.
        Parameters:
        directory - the directory where the API client files should be generated
      • AbstractAPIGenerator

        protected AbstractAPIGenerator​(java.lang.String directory,
                                       boolean optional)
        Constructs an AbstractAPIGenerator with the given directory and optional state.
        Parameters:
        directory - the directory where the API client files should be generated
        optional - true if the API client files are optional, false otherwise
      • AbstractAPIGenerator

        protected AbstractAPIGenerator​(java.lang.String directory,
                                       boolean optional,
                                       java.util.ResourceBundle resourceBundle)
        Constructs an AbstractAPIGenerator with the given directory, optional state, and ResourceBundle.
        Parameters:
        directory - the directory where the API client files should be generated
        optional - true if the API client files are optional, false otherwise
        resourceBundle - the ResourceBundle used for doc of the generated classes.
        Since:
        2.8.0
    • Method Detail

      • getDirectory

        protected java.nio.file.Path getDirectory()
        Gets the directory where the API client files should be generated.
        Returns:
        the directory where the API client files should be generated
      • isOptional

        protected boolean isOptional()
        If the API client files being generated are optional, that is, belong to an add-on.
        Returns:
        true if the API client files are optional, false otherwise
      • getMessages

        protected java.util.ResourceBundle getMessages()
        Gets the messages for doc of the generated classes.
        Returns:
        the ResourceBundle with the messages for doc
      • generateCoreAPIFiles

        public void generateCoreAPIFiles()
                                  throws java.io.IOException
        Generates the API client files for the core API implementors.
        Throws:
        java.io.IOException - if an error occurred while writing the API files
      • generateAPIFiles

        public void generateAPIFiles​(java.util.List<ApiImplementor> implementors)
                              throws java.io.IOException
        Generates the API client files of the given API implementors.
        Parameters:
        implementors - the API implementors, must not be null
        Throws:
        java.io.IOException - if an error occurred while writing the API files
      • generateAPIFiles

        protected abstract void generateAPIFiles​(ApiImplementor implementor)
                                          throws java.io.IOException
        Generates the API client files of the given API implementor.
        Parameters:
        implementor - the API implementor, must not be null
        Throws:
        java.io.IOException - if an error occurred while writing the API files