Package org.openrewrite.binary
Class Binary
java.lang.Object
org.openrewrite.binary.Binary
- 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).<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().boolean<P> StringprintAll(P p) <P> byte[]printAllAsBytes(P p) <P> StringprintAllTrimmed(P p) withCharset(Charset charset) withCharsetBomMarked(boolean marked) 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, printAll, printAll, printAllAsBytes, printAllTrimmed, printEqualsInput, printer, service, withChecksum, withFileAttributes, withSourcePathMethods inherited from interface org.openrewrite.Tree
cast, getId, getJacksonPolymorphicTypeTag, getMarkers, isScope, print, print, print, printTrimmed, printTrimmed, printTrimmed, withId, withMarkers
-
Constructor Details
-
Binary
public Binary()
-
-
Method Details
-
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()
-
getCharset
- Specified by:
getCharsetin interfaceSourceFile
-
withCharset
- Specified by:
withCharsetin interfaceSourceFile
-
isCharsetBomMarked
public boolean isCharsetBomMarked()- Specified by:
isCharsetBomMarkedin interfaceSourceFile
-
withCharsetBomMarked
- Specified by:
withCharsetBomMarkedin interfaceSourceFile
-
printAllAsBytes
public <P> byte[] printAllAsBytes(P p) - Specified by:
printAllAsBytesin interfaceSourceFile
-
printAll
- Specified by:
printAllin interfaceSourceFile
-
printAllTrimmed
- Specified by:
printAllTrimmedin interfaceSourceFile
-
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.
-