Class AbstractJReleaserConfigParser

java.lang.Object
org.jreleaser.config.AbstractJReleaserConfigParser
All Implemented Interfaces:
JReleaserConfigParser

public abstract class AbstractJReleaserConfigParser extends Object implements JReleaserConfigParser
Base implementation of the JReleaserConfigParser interface.
Since:
1.5.0
Author:
Andres Almiray
  • Constructor Details

    • AbstractJReleaserConfigParser

      protected AbstractJReleaserConfigParser(String fileExtension)
  • Method Details

    • getPreferredFileExtension

      public String getPreferredFileExtension()
      Description copied from interface: JReleaserConfigParser
      Returns the preferred file extension supported by this parser.
      Specified by:
      getPreferredFileExtension in interface JReleaserConfigParser
      Returns:
      the preferred file extension supported by this parser, should never return null.
    • supports

      public boolean supports(Path configFile)
      Description copied from interface: JReleaserConfigParser
      Whether the given config file format is supported or not.

      Implementors would typically look at the file extension.
      Specified by:
      supports in interface JReleaserConfigParser
      Parameters:
      configFile - the configuration file to inspect
      Returns:
      true if the given format is supported, false otherwise.
    • supports

      public boolean supports(String resource)
      Description copied from interface: JReleaserConfigParser
      Whether the given resource format is supported or not.

      Implementors would typically look at the file extension.
      Specified by:
      supports in interface JReleaserConfigParser
      Parameters:
      resource - the resource to inspect
      Returns:
      true if the given format is supported, false otherwise.
    • validate

      public void validate(Path configFile) throws IOException
      Description copied from interface: JReleaserConfigParser
      Checks the contents of the config file for syntax compliance.
      Specified by:
      validate in interface JReleaserConfigParser
      Parameters:
      configFile - the configuration file to inspect
      Throws:
      IOException