Class GoPathContext


  • public class GoPathContext
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      GoPathContext​(char fileSeparator, java.lang.String pathSeparator, java.lang.String goPath)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String resolve​(java.lang.String filePath)
      Try to resolve the absolute path of the given filePath.
      • Methods inherited from class java.lang.Object

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

      • GoPathContext

        public GoPathContext​(char fileSeparator,
                             java.lang.String pathSeparator,
                             @Nullable
                             java.lang.String goPath)
    • Method Detail

      • resolve

        public java.lang.String resolve​(java.lang.String filePath)
        Try to resolve the absolute path of the given filePath. If filePath is absolute (start with _) return the absolute path without the '_'. If filePath is relative, try to append the first GOPATH entry where this file exists, otherwise return a non-existing absolute path using the first GOPATH entry (or just filePath itself if GOPATH is empty). See GoCoverSensor.findInputFile(String, FileSystem)