Class VersionProviderFromClasspathProperties

java.lang.Object
net.sansa_stack.spark.cli.cmd.VersionProviderFromClasspathProperties
All Implemented Interfaces:
picocli.CommandLine.IVersionProvider
Direct Known Subclasses:
VersionProviderSansa

public abstract class VersionProviderFromClasspathProperties extends Object implements picocli.CommandLine.IVersionProvider
Implementation of picocli's CommandLine.IVersionProvider that reads the version string from an entry of a properties file on the class path with a specific key. This class is suitable for copy&paste between projects (or to put into a central place) Subclasses are then tied to a specific setup
Author:
Claus Stadler
  • Constructor Details

    • VersionProviderFromClasspathProperties

      public VersionProviderFromClasspathProperties()
  • Method Details

    • getResourceName

      public abstract String getResourceName()
    • getStrings

      public abstract Collection<String> getStrings(Properties properties)
    • getVersion

      public String[] getVersion() throws Exception
      Specified by:
      getVersion in interface picocli.CommandLine.IVersionProvider
      Throws:
      Exception