Class DefaultPathTranslator

All Implemented Interfaces:

@Named @Singleton public class DefaultPathTranslator extends Object implements PathTranslator
Resolves relative paths against a specific base directory.
  • Constructor Details

    • DefaultPathTranslator

      public DefaultPathTranslator()
  • Method Details

    • alignToBaseDirectory

      public String alignToBaseDirectory(String path, File basedir)
      Description copied from interface: PathTranslator
      Resolves the specified path against the given base directory. The resolved path will be absolute and uses the platform-specific file separator if a base directory is given. Otherwise, the input path will be returned unaltered.
      Specified by:
      alignToBaseDirectory in interface PathTranslator
      path - The path to resolve, may be null.
      basedir - The base directory to resolve relative paths against, may be null.
      The resolved path or null if the input path was null.