Package org.openrewrite.binary
Class BinaryParser
java.lang.Object
org.openrewrite.binary.BinaryParser
- All Implemented Interfaces:
Parser
Doesn't actually _parse_ anything, but if you want to wrap binary data into a SourceFile, this will do the trick
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.openrewrite.Parser
Parser.Builder, Parser.Input -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanparseInputs(Iterable<Parser.Input> sources, @Nullable Path relativeTo, 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, parse, requirePrintEqualsInput, reset
-
Constructor Details
-
BinaryParser
public BinaryParser()
-
-
Method Details
-
parseInputs
public Stream<SourceFile> parseInputs(Iterable<Parser.Input> sources, @Nullable @Nullable Path relativeTo, ExecutionContext ctx) - Specified by:
parseInputsin interfaceParser- 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.ctx- The execution context- Returns:
- A stream of
SourceFile.
-
accept
-
sourcePathFromSourceText
- Specified by:
sourcePathFromSourceTextin interfaceParser
-