Class OmniParser

java.lang.Object
org.openrewrite.polyglot.OmniParser
All Implemented Interfaces:
org.openrewrite.Parser

public class OmniParser extends Object implements org.openrewrite.Parser
  • Constructor Details

    • OmniParser

      public OmniParser()
  • Method Details

    • defaultResourceParsers

      public static List<org.openrewrite.Parser> 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

      public Stream<org.openrewrite.SourceFile> parseAll(Path rootDir)
    • parse

      public Stream<org.openrewrite.SourceFile> parse(Iterable<Path> sourceFiles, @Nullable @Nullable Path relativeTo, org.openrewrite.ExecutionContext ctx)
      Specified by:
      parse in interface org.openrewrite.Parser
    • acceptedPaths

      public List<Path> acceptedPaths(Path rootDir)
    • acceptedPaths

      public List<Path> acceptedPaths(Path rootDir, Path searchDir)
    • parseInputs

      public Stream<org.openrewrite.SourceFile> parseInputs(Iterable<org.openrewrite.Parser.Input> sources, @Nullable @Nullable Path relativeTo, org.openrewrite.ExecutionContext ctx)
      Specified by:
      parseInputs in interface org.openrewrite.Parser
    • accept

      public boolean accept(Path path)
      Specified by:
      accept in interface org.openrewrite.Parser
    • sourcePathFromSourceText

      public Path sourcePathFromSourceText(Path prefix, String sourceCode)
      Specified by:
      sourcePathFromSourceText in interface org.openrewrite.Parser
    • builder

      public static OmniParser.Builder builder(org.openrewrite.Parser... parsers)
    • builder

      public static OmniParser.Builder builder(List<org.openrewrite.Parser> parsers, org.openrewrite.Parser... more)