Package org.checkerframework.framework.stubifier
package org.checkerframework.framework.stubifier
-
ClassDescriptionBuild-time generator that pre-parses
.astubfiles into the binary stub format read byorg.checkerframework.framework.stub.BinaryStubReader.Tests forBinaryStubFileGenerator's two modes (per-file siblings, and a whole-directory--bundle), and for the source-fingerprint staleness detection thatBinaryStubData.matchesSource(byte[])provides for a user-supplied-Astubsfile (seeAnnotationFileElementTypes#commandLineBinaryStub, which relies on it instead of comparing file modification times).Writes parsed stub compilation units into the compressed binary stub format read byorg.checkerframework.framework.stub.BinaryStubReader.Tests forBinaryStubWriter.EnclosesBinaryStubWriterTest.Enclosing.DoublyNested, whose binary name has two$separators.An annotation two levels deep, to exercise more than one nesting separator.Rewrites Java source files, in place, into minimal stub files, and also generates the compressed binary stub file (BinaryStubWriter.OUTPUT_FILENAME) for the same directory from the same parsed compilation units.Regression test for a bug whereJavaStubifier'sBinaryStubWriterwas held in aprivate static finalfield: sincemaincan process several directories in one invocation, and aBinaryStubWriteraccumulates every class passed toprocessin instance fields with no reset between calls, reusing one writer across directories made each directory's ownannotated-jdk.bin.gzalso contain every earlier directory's classes.