Package org.openrewrite.polyglot
Class PolyglotParser
- java.lang.Object
-
- org.openrewrite.polyglot.PolyglotParser
-
- All Implemented Interfaces:
Parser<Polyglot.Source>
public class PolyglotParser extends java.lang.Object implements Parser<Polyglot.Source>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.openrewrite.Parser
Parser.Input
-
-
Constructor Summary
Constructors Constructor Description PolyglotParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(java.nio.file.Path path)java.util.List<Polyglot.Source>parse(ExecutionContext ex, org.graalvm.polyglot.Source... sources)java.util.List<Polyglot.Source>parseInputs(java.lang.Iterable<Parser.Input> sources, @Nullable java.nio.file.Path relativeTo, ExecutionContext ex)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openrewrite.Parser
accept, acceptedInputs, parse, parse, parse, randomSourceName, reset
-
-
-
-
Method Detail
-
parse
public java.util.List<Polyglot.Source> parse(ExecutionContext ex, org.graalvm.polyglot.Source... sources)
-
parseInputs
public java.util.List<Polyglot.Source> parseInputs(java.lang.Iterable<Parser.Input> sources, @Nullable @Nullable java.nio.file.Path relativeTo, ExecutionContext ex)
- Specified by:
parseInputsin interfaceParser<Polyglot.Source>- Parameters:
sources- A collection of inputs. At the conclusion of parsing all sources'Parser.Input.sourceare closed.relativeTo- A common relative path for allParser.Input.path.ex- The execution context- Returns:
- A list of
SourceFile.
-
accept
public boolean accept(java.nio.file.Path path)
- Specified by:
acceptin interfaceParser<Polyglot.Source>
-
-