Class PathEnvironment.Entry

  • Enclosing class:
    PathEnvironment

    private class PathEnvironment.Entry
    extends java.lang.Object
    Defines a mapping entry consisting of an unique symbolic name and a set of paths.
    Author:
    Holger Eichelberger
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String name  
      private java.lang.String[] paths  
    • Constructor Summary

      Constructors 
      Constructor Description
      Entry​(java.lang.String name, java.lang.String[] paths)
      Creates a new entry.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void add​(java.lang.String[] paths)
      Adds the given paths.
      private void convertPaths​(java.lang.String[] paths)
      Converts the paths to independent paths.
      (package private) java.lang.String getName()
      Returns the name of this mapping.
      (package private) java.io.File makeAbsolute​(java.lang.String location)
      Makes the given location absolute.
      (package private) java.lang.String makeRelative​(java.io.File location)
      Makes the given location relative.
      java.lang.String toString()
      Returns a textual representation of this object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • name

        private java.lang.String name
      • paths

        private java.lang.String[] paths
    • Constructor Detail

      • Entry

        Entry​(java.lang.String name,
              java.lang.String[] paths)
        Creates a new entry.
        Parameters:
        name - the unique name of the entry (at least within one Eclipse programming language support)
        paths - the paths to map to/from name
    • Method Detail

      • convertPaths

        private void convertPaths​(java.lang.String[] paths)
        Converts the paths to independent paths.
        Parameters:
        paths - the pats to be converted
      • makeRelative

        java.lang.String makeRelative​(java.io.File location)
        Makes the given location relative.
        Parameters:
        location - the location to make relative
        Returns:
        the relative location or null if the location cannot be made relative by this entry
      • makeAbsolute

        java.io.File makeAbsolute​(java.lang.String location)
        Makes the given location absolute.
        Parameters:
        location - the location to make absolute
        Returns:
        the absolute location or null if the location cannot be made absolute by this entry
      • getName

        java.lang.String getName()
        Returns the name of this mapping.
        Returns:
        the name
      • add

        void add​(java.lang.String[] paths)
        Adds the given paths.
        Parameters:
        paths - the paths to add
      • toString

        public java.lang.String toString()
        Returns a textual representation of this object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a textual representation