Class Sources


  • public abstract class Sources
    extends java.lang.Object
    Utilities for Source.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      private static class  Sources.FileSource
      Implementation of Source.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Sources()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Source file​(java.io.File baseDirectory, java.lang.String fileName)  
      private static boolean isFile​(Source source)  
      static Source of​(java.io.File file)  
      static Source of​(java.net.URL url)  
      private static java.lang.String trimOrNull​(java.lang.String s, java.lang.String suffix)
      Looks for a suffix on a path and returns either the path with the suffix removed or null.
      static Source url​(java.lang.String url)  
      • Methods inherited from class java.lang.Object

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

      • Sources

        private Sources()
    • Method Detail

      • of

        public static Source of​(java.io.File file)
      • of

        public static Source of​(java.net.URL url)
      • file

        public static Source file​(java.io.File baseDirectory,
                                  java.lang.String fileName)
      • url

        public static Source url​(java.lang.String url)
      • trimOrNull

        private static java.lang.String trimOrNull​(java.lang.String s,
                                                   java.lang.String suffix)
        Looks for a suffix on a path and returns either the path with the suffix removed or null.
      • isFile

        private static boolean isFile​(Source source)