Package org.openrewrite
Class Parser.Input
- java.lang.Object
-
- org.openrewrite.Parser.Input
-
- Enclosing interface:
- Parser<S extends SourceFile>
public static class Parser.Input extends java.lang.ObjectA source input.pathmay 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.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)static Parser.InputfromResource(java.lang.String resource)static java.util.List<Parser.Input>fromResource(java.lang.String resource, java.lang.String delimiter)static Parser.InputfromString(java.lang.String source)java.nio.file.PathgetPath()java.nio.file.PathgetRelativePath(@Nullable java.nio.file.Path relativeTo)java.io.InputStreamgetSource()inthashCode()booleanisSynthetic()
-
-
-
Method Detail
-
fromString
@Incubating(since="7.0.0") public static Parser.Input fromString(java.lang.String source)
-
fromResource
@Incubating(since="7.0.0") public static Parser.Input fromResource(java.lang.String resource)
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-