net.sf.saxon.lib

## Class StandardEnvironmentVariableResolver

- java.lang.Object
- - net.sf.saxon.lib.StandardEnvironmentVariableResolver

- All Implemented Interfaces:
    EnvironmentVariableResolver

      public class StandardEnvironmentVariableResolver
      extends Object
      implements EnvironmentVariableResolver

  Default implementation of the `EnvironmentVariableResolver`. This implementation maps "environment variables" as defined in the XPath context to environment variables delivered by Java using the `System.getenv()` method.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StandardEnvironmentVariableResolver()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Set<String>` | `getAvailableEnvironmentVariables()` Get the list of available environment variables.
    `String` | `getEnvironmentVariable(String name)` Get the value of a specific environment variable

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StandardEnvironmentVariableResolver

          public StandardEnvironmentVariableResolver()

  - ### Method Detail

    - #### getAvailableEnvironmentVariables

          public Set<String> getAvailableEnvironmentVariables()

      Get the list of available environment variables.
      Specified by:
        `getAvailableEnvironmentVariables` in interface `EnvironmentVariableResolver`
      Returns:
        a set of strings; each such string should be an acceptable argument to the method `getEnvironmentVariable(String)`

    - #### getEnvironmentVariable

          public String getEnvironmentVariable(String name)

      Get the value of a specific environment variable
      Specified by:
        `getEnvironmentVariable` in interface `EnvironmentVariableResolver`
      Parameters:
        `name` - the name of the required environment variable
      Returns:
        the value of the named environment variable, or null if the variable is not defined. The method must not return null if the name is in the list of variables returned by the method `getAvailableEnvironmentVariables()`

Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.