Package org.openrewrite.tree
Class ParseError
java.lang.Object
org.openrewrite.tree.ParseError
- All Implemented Interfaces:
SourceFile,Tree
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<R extends Tree,P>
Raccept(TreeVisitor<R, P> v, P p) Supports polymorphic visiting viaTreeVisitor.visit(Tree, Object).static ParseErrorbuild(Parser parser, Parser.Input input, @Nullable Path relativeTo, ExecutionContext ctx, Throwable t) <P> booleanisAcceptable(TreeVisitor<?, P> v, P p) Checks the supplied argument to see if the supplied visitor and its context would be valid arguments to accept().<P> TreeVisitor<?,PrintOutputCapture<P>> withCharset(Charset charset) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openrewrite.SourceFile
getChecksum, getFileAttributes, getSourcePath, getStyle, getStyle, getWeight, isCharsetBomMarked, printAll, printAll, printAll, printAllAsBytes, printAllAsBytes, printAllTrimmed, printAllTrimmed, printEqualsInput, service, withCharsetBomMarked, withChecksum, withFileAttributes, withSourcePathMethods inherited from interface org.openrewrite.Tree
cast, getId, getJacksonPolymorphicTypeTag, getMarkers, isScope, print, print, print, printTrimmed, printTrimmed, printTrimmed, withId, withMarkers
-
Constructor Details
-
ParseError
public ParseError()
-
-
Method Details
-
getCharset
- Specified by:
getCharsetin interfaceSourceFile
-
printer
- Specified by:
printerin interfaceSourceFile- Specified by:
printerin interfaceTree
-
withCharset
- Specified by:
withCharsetin interfaceSourceFile
-
isAcceptable
Description copied from interface:TreeChecks the supplied argument to see if the supplied visitor and its context would be valid arguments to accept(). Typically, this involves checking that the visitor is of a type that operates on this kind of tree. e.g.: A Java Tree implementation would return true for JavaVisitors and false for MavenVisitors- Specified by:
isAcceptablein interfaceTree- Type Parameters:
P- the visitor's context argument- Returns:
- 'true' if the arguments to this function would be valid arguments to accept()
-
accept
Description copied from interface:TreeSupports polymorphic visiting viaTreeVisitor.visit(Tree, Object). This is useful in cases where an AST type contains a field that is of a type with a hierarchy. The visitor doesn't have to figure out which visit method to call by using instanceof. -
build
public static ParseError build(Parser parser, Parser.Input input, @Nullable @Nullable Path relativeTo, ExecutionContext ctx, Throwable t) -
toException
-