Class BinaryStubData.ClassRecord
java.lang.Object
org.checkerframework.framework.stub.BinaryStubData.ClassRecord
- Enclosing class:
BinaryStubData
Annotation data for a single class or interface, including its members.
-
Field Summary
FieldsModifier and TypeFieldDescriptionFor a record declaration (kind == KIND_RECORD) whose body declares an explicit (non-compact) canonical constructor, one type-annotation array per constructor parameter, in parameter order -- matchingAnnotationFileParser'sRecordStub#componentsInCanonicalConstructoroverride.Per-component annotation records for a record declaration (kind == KIND_RECORD).int[]Annotation-pool indices of the declaration annotations on this class.Field records for the annotated fields of this class.byteOne of theKIND_*constants, recording what kind of declaration this class record was written from.static final bytekindvalue for an annotation-type declaration.static final bytekindvalue for a class or interface declaration: bothElementKind.CLASSandElementKind.INTERFACEmap to this constant.static final bytekindvalue for an enum declaration.static final bytekindvalue for a record declaration.Method and constructor records for the annotated methods of this class.intIndex intoBinaryStubData.stringPoolof the fully-qualified class name (using'.'as separator, e.g.intIndex intoBinaryStubData.stringPoolof the outermost enclosing class name, or0if this is a top-level class (i.e., it has no enclosing class recorded in the binary stub).int[]Indices intoBinaryStubData.stringPoolof the simple signatures of this class's unannotated stub-declared methods, written in place of an all-emptyBinaryStubData.MethodRecord.Per-type-parameter annotation records for this class. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty ClassRecord; fields are populated by the binary reader. -
Method Summary
-
Field Details
-
KIND_CLASS_OR_INTERFACE
public static final byte KIND_CLASS_OR_INTERFACEkindvalue for a class or interface declaration: bothElementKind.CLASSandElementKind.INTERFACEmap to this constant. Defined once inBinaryStubWriter.KIND_CLASS_OR_INTERFACE.- See Also:
-
KIND_ENUM
public static final byte KIND_ENUMkindvalue for an enum declaration. Defined once inBinaryStubWriter.KIND_ENUM.- See Also:
-
KIND_ANNOTATION_TYPE
public static final byte KIND_ANNOTATION_TYPEkindvalue for an annotation-type declaration. Defined once inBinaryStubWriter.KIND_ANNOTATION_TYPE.- See Also:
-
KIND_RECORD
public static final byte KIND_RECORDkindvalue for a record declaration. Defined once inBinaryStubWriter.KIND_RECORD.- See Also:
-
nameIndex
public int nameIndexIndex intoBinaryStubData.stringPoolof the fully-qualified class name (using'.'as separator, e.g."com.sun.tools.javac.code.Symbol.Completer"). -
outerNameIndex
public int outerNameIndexIndex intoBinaryStubData.stringPoolof the outermost enclosing class name, or0if this is a top-level class (i.e., it has no enclosing class recorded in the binary stub). For inner classes this is the name of the top-level class that contains them, used to efficiently build the inner-class map without a string-scan heuristic. -
kind
public byte kindOne of theKIND_*constants, recording what kind of declaration this class record was written from. The reader compares this against the realTypeElement's kind before applying the record, since the JDK being compiled against can differ in version from the one the annotated JDK's stub sources were written against (e.g.java.nio.ByteOrderbecame a real enum in JDK 26 after being a plain class through JDK 25) -- seeBinaryStubReader#applyClassRecord. -
declAnnos
public int[] declAnnosAnnotation-pool indices of the declaration annotations on this class. -
fields
Field records for the annotated fields of this class. -
methods
Method and constructor records for the annotated methods of this class. -
presenceOnlyMethodSigs
public int[] presenceOnlyMethodSigsIndices intoBinaryStubData.stringPoolof the simple signatures of this class's unannotated stub-declared methods, written in place of an all-emptyBinaryStubData.MethodRecord.Such a method is not a no-op: if the class does not really declare it, the declaration is a fake override, and its presence alone resets the member's type at this subtype (see
BinaryStubReader#applyFakeOverride). Only the signature is needed for that.Empty for a built-in stub file, whose unannotated members keep full records so that they can be
@FromStubFile-marked; seeBinaryStubWriter#omitUnannotatedMembers. -
typeParams
Per-type-parameter annotation records for this class. Elementiholds the annotations for thei-th type parameter declared by this class. -
components
Per-component annotation records for a record declaration (kind == KIND_RECORD). Empty (zero-length) for non-record classes; non-null but possibly empty for records that declare no annotated components. -
canonicalConstructorParamAnnos
For a record declaration (kind == KIND_RECORD) whose body declares an explicit (non-compact) canonical constructor, one type-annotation array per constructor parameter, in parameter order -- matchingAnnotationFileParser'sRecordStub#componentsInCanonicalConstructoroverride.nullif the record has no such explicit constructor.
-
-
Constructor Details
-
ClassRecord
public ClassRecord()Creates an empty ClassRecord; fields are populated by the binary reader.
-