Class WorkspaceMechanicConfigParser

java.lang.Object
de.funfried.netbeans.plugins.external.formatter.eclipse.mechanic.WorkspaceMechanicConfigParser

public class WorkspaceMechanicConfigParser extends Object
A parser for Workspace Mechanic configuration files.
  • Constructor Details

    • WorkspaceMechanicConfigParser

      public WorkspaceMechanicConfigParser()
  • Method Details

    • readPropertiesFromConfiguration

      @NonNull public static Map<String,String> readPropertiesFromConfiguration(String path, String prefix) throws IOException
      Parses and returns properties of the given path into a key value Map. If an optional prefix is specified, only the properties where the key starts with the given prefix are returned and the prefix will be removed from the keys in the returned Map.
      Parameters:
      path - a configuration file path or URL
      prefix - an optional key prefix
      Returns:
      properties of the given path as a key value Map
      Throws:
      IOException - if there is an issue accessing the given configuration file