Class Parser.Input

  • Enclosing interface:
    Parser<S extends SourceFile>

    public static class Parser.Input
    extends java.lang.Object
    A source input. path may be a synthetic path and not represent a resolvable path on disk, as is the case when parsing sources from BigQuery (we have a relative path from the original Github repository and the sources, but don't have these sources on disk).

    Nevertheless, this class is a generalization that applies well enough to paths that are resolvable on disk, where the file has been pre-read into memory.

    • Constructor Summary

      Constructors 
      Constructor Description
      Input​(java.nio.file.Path path, java.util.function.Supplier<java.io.InputStream> source)  
      Input​(java.nio.file.Path path, java.util.function.Supplier<java.io.InputStream> source, boolean synthetic)  
    • Constructor Detail

      • Input

        public Input​(java.nio.file.Path path,
                     java.util.function.Supplier<java.io.InputStream> source)
      • Input

        public Input​(java.nio.file.Path path,
                     java.util.function.Supplier<java.io.InputStream> source,
                     boolean synthetic)
    • Method Detail

      • fromResource

        @Incubating(since="7.0.0")
        public static java.util.List<Parser.Input> fromResource​(java.lang.String resource,
                                                                java.lang.String delimiter)
      • getPath

        public java.nio.file.Path getPath()
      • getRelativePath

        public java.nio.file.Path getRelativePath​(@Nullable
                                                  @Nullable java.nio.file.Path relativeTo)
      • getSource

        public java.io.InputStream getSource()
      • isSynthetic

        public boolean isSynthetic()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object