Class VersionProvider

java.lang.Object
com.github.isuhorukov.log.watcher.VersionProvider
All Implemented Interfaces:
picocli.CommandLine.IVersionProvider

public class VersionProvider extends Object implements picocli.CommandLine.IVersionProvider
Provides the version information of the project.

This class implements the CommandLine.IVersionProvider interface to supply version information for the CLI application. The version information is read from a version.properties file located in the classpath.

  • Constructor Details

    • VersionProvider

      public VersionProvider()
  • Method Details

    • getVersion

      public String[] getVersion() throws Exception
      Retrieves the version information from the version.properties file.
      Specified by:
      getVersion in interface picocli.CommandLine.IVersionProvider
      Returns:
      an array of strings containing the version information.
      Throws:
      Exception - if there is an error reading the version properties file.