Package org.openrewrite.polyglot
Class OmniParser
java.lang.Object
org.openrewrite.polyglot.OmniParser
- All Implemented Interfaces:
org.openrewrite.Parser
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.openrewrite.Parser
org.openrewrite.Parser.Input -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptedPaths(Path rootDir) acceptedPaths(Path rootDir, Path searchDir) static OmniParser.Builderstatic OmniParser.Builderbuilder(org.openrewrite.Parser... parsers) static List<org.openrewrite.Parser>Does not include text and quark parsers.Stream<org.openrewrite.SourceFile>Stream<org.openrewrite.SourceFile>Stream<org.openrewrite.SourceFile>parseInputs(Iterable<org.openrewrite.Parser.Input> sources, @Nullable Path relativeTo, org.openrewrite.ExecutionContext ctx) sourcePathFromSourceText(Path prefix, String sourceCode) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openrewrite.Parser
accept, acceptedInputs, getCharset, parse, parse, requirePrintEqualsInput, reset
-
Constructor Details
-
OmniParser
public OmniParser()
-
-
Method Details
-
defaultResourceParsers
Does not include text and quark parsers. We leave it up to the caller to determine what the division of labor should be between PlainText and the Quark parsers, if any. -
parseAll
-
parse
public Stream<org.openrewrite.SourceFile> parse(Iterable<Path> sourceFiles, @Nullable @Nullable Path relativeTo, org.openrewrite.ExecutionContext ctx) - Specified by:
parsein interfaceorg.openrewrite.Parser
-
acceptedPaths
-
acceptedPaths
-
parseInputs
public Stream<org.openrewrite.SourceFile> parseInputs(Iterable<org.openrewrite.Parser.Input> sources, @Nullable @Nullable Path relativeTo, org.openrewrite.ExecutionContext ctx) - Specified by:
parseInputsin interfaceorg.openrewrite.Parser
-
accept
- Specified by:
acceptin interfaceorg.openrewrite.Parser
-
sourcePathFromSourceText
- Specified by:
sourcePathFromSourceTextin interfaceorg.openrewrite.Parser
-
builder
-
builder
public static OmniParser.Builder builder(List<org.openrewrite.Parser> parsers, org.openrewrite.Parser... more)
-