Class UniquePaths


  • public class UniquePaths
    extends java.lang.Object
    Generate unique paths, for tests isolation
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String SEP  
      static java.lang.String U_PATTERN  
    • Constructor Summary

      Constructors 
      Constructor Description
      UniquePaths()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String get​(java.lang.Object nameReference)
      Get a unique ID with no base path
      static java.lang.String get​(java.lang.Object nameReference, java.lang.String basePath)
      Return a unique path based on basePath
      • Methods inherited from class java.lang.Object

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

      • UniquePaths

        public UniquePaths()
    • Method Detail

      • get

        public static java.lang.String get​(java.lang.Object nameReference,
                                           java.lang.String basePath)
        Return a unique path based on basePath
        Parameters:
        nameReference - The simple class name of that object is used as part of the generated unique ID
        basePath - All occurrences of U_PATTERN in basePath are replaced by the generated unique ID. If $U$ is not found in basePath, unique ID is added at its end.
        Returns:
        path with a unique value for each call.
      • get

        public static java.lang.String get​(java.lang.Object nameReference)
        Get a unique ID with no base path
        Parameters:
        nameReference - The simple class name of that object is used as part of the generated unique ID
        Returns:
        path with a unique value for each call