Class TypeTable
java.lang.Object
org.openrewrite.java.internal.parser.TypeTable
- All Implemented Interfaces:
org.openrewrite.java.internal.parser.JavaParserClasspathLoader
@Incubating(since="8.44.0")
public class TypeTable
extends Object
implements org.openrewrite.java.internal.parser.JavaParserClasspathLoader
Type tables are written as a TSV file with the following columns:
- groupId
- artifactId
- version
- classAccess
- className
- classSignature
- classSuperclassSignature
- classSuperinterfaceSignatures[]
- access
- memberName
- descriptor
- signature
- parameterNames
- exceptions[]
Descriptor and signature are in JVMS 4.3 format. Because these type tables could get fairly large, the format is optimized for fast record access. TSV was chosen over CSV for its simplicity and for the reasons cited here.
There is of course a lot of duplication in the class and GAV columns, but compression cuts down on the disk impact of that and the value is an overall single table representation.
To read a compressed type table file (which is compressed with gzip), the following command can be used:
gzcat types.tsv.zip.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable TypeTablefromClasspath(org.openrewrite.ExecutionContext ctx, Collection<String> artifactNames) @Nullable Pathstatic TypeTable.WriternewWriter(OutputStream out)
-
Field Details
-
VERIFY_CLASS_WRITING
Verifies that the bytecodes written out for the types represented in a type table will not be invalid and therefore rejected by the JVM verifier when used in a compilation step.- See Also:
-
DEFAULT_RESOURCE_PATH
- See Also:
-
-
Method Details
-
fromClasspath
public static @Nullable TypeTable fromClasspath(org.openrewrite.ExecutionContext ctx, Collection<String> artifactNames) -
newWriter
-
load
- Specified by:
loadin interfaceorg.openrewrite.java.internal.parser.JavaParserClasspathLoader
-