org.apache.tamaya.resolver.internal

## Class FileResolver

- java.lang.Object
- - org.apache.tamaya.resolver.internal.FileResolver

- All Implemented Interfaces:
    ExpressionResolver

      @Priority(value=400)
      public final class FileResolver
      extends Object
      implements ExpressionResolver

  Property resolver implementation that tries to load the given resource from the current file system.
  If the `Resources` module is available this module is used for resolving the expression. It can be explicitly addressed by prefixing `file:`, e.g. `${file:c:/temp/mytext.txt}`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileResolver()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `evaluate(String expression)` Evaluates the given expression.
    `String` | `getResolverPrefix()` Get the unique resolver prefix.

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

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

- - ### Constructor Detail

    - #### FileResolver

          public FileResolver()

  - ### Method Detail

    - #### getResolverPrefix

          public String getResolverPrefix()

      Description copied from interface: `ExpressionResolver`
      Get the unique resolver prefix. This allows to address a resolver explicitly, in case of conflicts. By default all registered resolvers are called in order as defined by the `Priority` annotation.
      Specified by:
        `getResolverPrefix` in interface `ExpressionResolver`
      Returns:
        the prefix that identifies this resolver instance, e.g. 'config:'. The ':' hereby is not required as a separator, but it is recommended to use it, because it fits well, with the other existing resolvers and is easy to read.

    - #### evaluate

          public String evaluate(String expression)

      Description copied from interface: `ExpressionResolver`
      Evaluates the given expression.
      Specified by:
        `evaluate` in interface `ExpressionResolver`
      Parameters:
        `expression` - the expression to be evaluated, not null. If a resolver was addressed explicitly, the prefix is removed prior to calling this method.
      Returns:
        the evaluated expression, or null, if the evaluator is not able to resolve the expression.

Copyright © 2014–2015 Apache Software Foundation. All rights reserved.