Package org.openrewrite
Class Parser.Input
java.lang.Object
org.openrewrite.Parser.Input
- Enclosing interface:
- Parser
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
ConstructorsConstructorDescriptionInput
(Path path, @Nullable FileAttributes fileAttributes, Supplier<InputStream> source) Input
(Path path, @Nullable FileAttributes fileAttributes, Supplier<InputStream> source, boolean synthetic) Input
(Path path, Supplier<InputStream> source) -
Method Summary
Modifier and TypeMethodDescriptionboolean
static Parser.Input
fromResource
(String resource) static List<Parser.Input>
fromResource
(String resource, String delimiter) static List<Parser.Input>
fromResource
(String resource, String delimiter, @Nullable Charset charset) static Parser.Input
fromString
(String source) static Parser.Input
fromString
(String source, Charset charset) static Parser.Input
fromString
(Path sourcePath, String source) static Parser.Input
fromString
(Path sourcePath, String source, Charset charset) getRelativePath
(@Nullable Path relativeTo) int
hashCode()
-
Constructor Details
-
Input
-
Input
public Input(Path path, @Nullable @Nullable FileAttributes fileAttributes, Supplier<InputStream> source) -
Input
public Input(Path path, @Nullable @Nullable FileAttributes fileAttributes, Supplier<InputStream> source, boolean synthetic)
-
-
Method Details