Interface PrefixesSource

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  PrefixesSource.Parser  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> entries()
      The prefix entries.
      java.lang.String message()
      Message worth logging if valid() returns false.
      static PrefixesSource of​(org.eclipse.aether.repository.RemoteRepository origin, java.nio.file.Path path)
      Creates PrefixesSource out of passed in parameters, never returns null.
      org.eclipse.aether.repository.RemoteRepository origin()
      The origin repository of this source.
      java.nio.file.Path path()
      The file path (ie local repository or user provided one) this source got entries from.
      boolean valid()
      Returns true if source is valid and contains valid entries.
    • Method Detail

      • origin

        org.eclipse.aether.repository.RemoteRepository origin()
        The origin repository of this source.
      • path

        java.nio.file.Path path()
        The file path (ie local repository or user provided one) this source got entries from.
      • message

        java.lang.String message()
        Message worth logging if valid() returns false.
      • valid

        boolean valid()
        Returns true if source is valid and contains valid entries.
      • entries

        java.util.List<java.lang.String> entries()
        The prefix entries.
      • of

        static PrefixesSource of​(org.eclipse.aether.repository.RemoteRepository origin,
                                 java.nio.file.Path path)
        Creates PrefixesSource out of passed in parameters, never returns null. The returned source should be checked for valid() and use only if it returns true.

        This method is "forgiving" to all kind of IO problems while reading (file not found, etc.) and will never throw IOException as prefix file processing should not interrupt main flow due which prefix file processing is happening in the first place. Ideally, user is notified at least by logging if any problem happens.