Class UserAliasesSource<C>

java.lang.Object
com.github.rvesse.airline.parser.aliases.UserAliasesSource<C>
Type Parameters:
C - Command type

public class UserAliasesSource<C> extends Object
Represents the source of user defined aliases
Author:
rvesse
  • Field Details

    • DEFAULT_LOCATORS

      public static final ResourceLocator[] DEFAULT_LOCATORS
      Default user alias source locators
  • Constructor Details

  • Method Details

    • getFilename

      public String getFilename()
      Gets the filename of the configuration file that will be scanned for alias definitions
      Returns:
      Configuration file name
    • getSearchLocations

      public List<String> getSearchLocations()
      Gets the search locations where the configuration file may be located in order of preference
      Returns:
      Search locations in order of preference
    • getPrefix

      public String getPrefix()
      Gets the prefix that is used to distinguish alias definitions from other property definitions in the configuration file

      If this is null/empty/blank then no prefix is in effect

      Returns:
      Prefix
    • getLocators

      public List<ResourceLocator> getLocators()
      Gets the locators that are used to resolve search locations to actual usable locations
      Returns:
      User alias locators
    • load

      Loads the alias metadata based on the configured sources
      Returns:
      Alias metadata
      Throws:
      FileNotFoundException - Thrown if unable to find a properties file
      IOException - Thrown if unable to read a properties file