Package aQute.lib.io

Class IO.EnvironmentCalculator

  • Enclosing class:
    IO

    static class IO.EnvironmentCalculator
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean iswindows  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) java.lang.String getenv​(java.lang.String key)  
      (package private) java.io.File getHome()  
      (package private) java.io.File getJavaHome()  
      (package private) java.lang.String getSystemEnv​(java.lang.String key)
      Get the value of a system environment variable.
      private java.lang.String getSystemEnv​(java.lang.String key, java.util.Set<java.lang.String> visited)  
      private java.io.File testFile​(java.lang.String path)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • iswindows

        private boolean iswindows
    • Constructor Detail

      • EnvironmentCalculator

        public EnvironmentCalculator​(boolean iswindows)
    • Method Detail

      • getSystemEnv

        java.lang.String getSystemEnv​(java.lang.String key)
        Get the value of a system environment variable. Expand any macros (%...%) if run on windows. Generally, on Linux et. al. environment variables are already expanded.
        Parameters:
        key - the environment variable name
        Returns:
        the value with expanded macros if on windows.
      • getSystemEnv

        private java.lang.String getSystemEnv​(java.lang.String key,
                                              java.util.Set<java.lang.String> visited)
      • getenv

        java.lang.String getenv​(java.lang.String key)
      • getHome

        java.io.File getHome()
      • getJavaHome

        java.io.File getJavaHome()
      • testFile

        private java.io.File testFile​(java.lang.String path)