// Path: phantomjs-maven-core/src/main/java/com/github/klieber/phantomjs/sys/LinuxProperties.java
// @Named
// public class LinuxProperties {
// 
//   private static final Logger LOGGER = LoggerFactory.getLogger(LinuxProperties.class);
// 
//   private static final String OS_RELEASE_PROPERTIES_FILE = "/etc/os-release";
//   private static final String DISTRIBUTION_NAME = "ID";
//   private static final String DISTRIBUTION_VERSION_ID = "VERSION_ID";
// 
//   private final File file;
// 
//   private Properties linuxProperties;
// 
//   public LinuxProperties() {
//     this(new File(OS_RELEASE_PROPERTIES_FILE));
//   }
// 
//   LinuxProperties(File file) {
//     this.file = file;
//     this.linuxProperties = null;
//   }
// 
//   public String getDistribution() {
//     return getProperty(DISTRIBUTION_NAME);
//   }
// 
//   public String getDistributionVersion() {
//     return getProperty(DISTRIBUTION_VERSION_ID);
//   }
// 
//   private String getProperty(String name) {
//     String property = getLinuxProperties().getProperty(name);
//     return property != null ? property.replaceAll("^\"(.*)\"$", "$1").toLowerCase() : null;
//   }
// 
//   private Properties getLinuxProperties() {
//     if (linuxProperties == null) {
//       linuxProperties = readProperties();
//     }
//     return linuxProperties;
//   }
// 
//   private Properties readProperties() {
//     Properties properties = new Properties();
//     try {
//       if (this.file.exists() && this.file.canRead()) {
//         FileInputStream in = new FileInputStream(this.file);
//         properties.load(in);
//         in.close();
//       }
//     } catch (IOException e) {
//       LOGGER.trace("unable to read linux os linuxProperties", e);
//     }
//     return properties;
//   }
// }
// 
// Path: phantomjs-maven-core/src/main/java/com/github/klieber/phantomjs/sys/SystemProperties.java
// @Named
// public class SystemProperties {
// 
//   private static final String OS_NAME = "os.name";
//   private static final String OS_VERSION = "os.version";
//   private static final String OS_ARCH = "os.arch";
//   private static final String ENV_PATH = "PATH";
// 
//   public String getOsName() {
//     return getSystemProperty(OS_NAME);
//   }
// 
//   public String getOsVersion() {
//     return getSystemProperty(OS_VERSION);
//   }
// 
//   public String getOsArch() {
//     return getSystemProperty(OS_ARCH);
//   }
// 
//   public List<String> getPath() {
//     String systemPath = System.getenv(ENV_PATH);
//     return systemPath != null ? Arrays.asList(systemPath.split(File.pathSeparator)) : Collections.<String>emptyList();
//   }
// 
//   private String getSystemProperty(String name) {
//     String property = System.getProperty(name);
//     return property != null ? property.toLowerCase() : null;
//   }
// }


import com.github.klieber.phantomjs.sys.LinuxProperties;
import com.github.klieber.phantomjs.sys.SystemProperties;
import javax.inject.Inject;
import javax.inject.Named;
/*-
 * #%L
 * PhantomJS Maven Core
 * %%
 * Copyright (C) 2013 - 2017 Kyle Lieber
 * %%
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 * #L%
 */
package com.github.klieber.phantomjs.sys.os;



@Named
public class OperatingSystemFactory {

  private SystemProperties systemProperties;
  private LinuxProperties linuxProperties;

  @Inject
  public OperatingSystemFactory(SystemProperties systemProperties,
// Path: phantomjs-maven-core/src/main/java/com/github/klieber/phantomjs/sys/LinuxProperties.java
// @Named
// public class LinuxProperties {
// 
//   private static final Logger LOGGER = LoggerFactory.getLogger(LinuxProperties.class);
// 
//   private static final String OS_RELEASE_PROPERTIES_FILE = "/etc/os-release";
//   private static final String DISTRIBUTION_NAME = "ID";
//   private static final String DISTRIBUTION_VERSION_ID = "VERSION_ID";
// 
//   private final File file;
// 
//   private Properties linuxProperties;
// 
//   public LinuxProperties() {
//     this(new File(OS_RELEASE_PROPERTIES_FILE));
//   }
// 
//   LinuxProperties(File file) {
//     this.file = file;
//     this.linuxProperties = null;
//   }
// 
//   public String getDistribution() {
//     return getProperty(DISTRIBUTION_NAME);
//   }
// 
//   public String getDistributionVersion() {
//     return getProperty(DISTRIBUTION_VERSION_ID);
//   }
// 
//   private String getProperty(String name) {
//     String property = getLinuxProperties().getProperty(name);
//     return property != null ? property.replaceAll("^\"(.*)\"$", "$1").toLowerCase() : null;
//   }
// 
//   private Properties getLinuxProperties() {
//     if (linuxProperties == null) {
//       linuxProperties = readProperties();
//     }
//     return linuxProperties;
//   }
// 
//   private Properties readProperties() {
//     Properties properties = new Properties();
//     try {
//       if (this.file.exists() && this.file.canRead()) {
//         FileInputStream in = new FileInputStream(this.file);
//         properties.load(in);
//         in.close();
//       }
//     } catch (IOException e) {
//       LOGGER.trace("unable to read linux os linuxProperties", e);
//     }
//     return properties;
//   }
// }
// 
// Path: phantomjs-maven-core/src/main/java/com/github/klieber/phantomjs/sys/SystemProperties.java
// @Named
// public class SystemProperties {
// 
//   private static final String OS_NAME = "os.name";
//   private static final String OS_VERSION = "os.version";
//   private static final String OS_ARCH = "os.arch";
//   private static final String ENV_PATH = "PATH";
// 
//   public String getOsName() {
//     return getSystemProperty(OS_NAME);
//   }
// 
//   public String getOsVersion() {
//     return getSystemProperty(OS_VERSION);
//   }
// 
//   public String getOsArch() {
//     return getSystemProperty(OS_ARCH);
//   }
// 
//   public List<String> getPath() {
//     String systemPath = System.getenv(ENV_PATH);
//     return systemPath != null ? Arrays.asList(systemPath.split(File.pathSeparator)) : Collections.<String>emptyList();
//   }
// 
//   private String getSystemProperty(String name) {
//     String property = System.getProperty(name);
//     return property != null ? property.toLowerCase() : null;
//   }
// }


// Path: phantomjs-maven-core/src/main/java/com/github/klieber/phantomjs/sys/os/OperatingSystemFactory.java
import com.github.klieber.phantomjs.sys.LinuxProperties;
import com.github.klieber.phantomjs.sys.SystemProperties;
import javax.inject.Inject;
import javax.inject.Named;

/*-
 * #%L
 * PhantomJS Maven Core
 * %%
 * Copyright (C) 2013 - 2017 Kyle Lieber
 * %%
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 * #L%
 */
package com.github.klieber.phantomjs.sys.os;



@Named
public class OperatingSystemFactory {

  private SystemProperties systemProperties;
  private LinuxProperties linuxProperties;

  @Inject
  public OperatingSystemFactory(SystemProperties systemProperties,
                                LinuxProperties linuxProperties) {