Class BinaryStubData.ClassRecord

java.lang.Object
org.checkerframework.framework.stub.BinaryStubData.ClassRecord
Enclosing class:
BinaryStubData

public static class BinaryStubData.ClassRecord extends Object
Annotation data for a single class or interface, including its members.
  • Field Details

    • KIND_CLASS_OR_INTERFACE

      public static final byte KIND_CLASS_OR_INTERFACE
      kind value for a class or interface declaration: both ElementKind.CLASS and ElementKind.INTERFACE map to this constant. Defined once in BinaryStubWriter.KIND_CLASS_OR_INTERFACE.
      See Also:
    • KIND_ENUM

      public static final byte KIND_ENUM
      kind value for an enum declaration. Defined once in BinaryStubWriter.KIND_ENUM.
      See Also:
    • KIND_ANNOTATION_TYPE

      public static final byte KIND_ANNOTATION_TYPE
      kind value for an annotation-type declaration. Defined once in BinaryStubWriter.KIND_ANNOTATION_TYPE.
      See Also:
    • KIND_RECORD

      public static final byte KIND_RECORD
      kind value for a record declaration. Defined once in BinaryStubWriter.KIND_RECORD.
      See Also:
    • nameIndex

      public int nameIndex
      Index into BinaryStubData.stringPool of the fully-qualified class name (using '.' as separator, e.g. "com.sun.tools.javac.code.Symbol.Completer").
    • outerNameIndex

      public int outerNameIndex
      Index into BinaryStubData.stringPool of the outermost enclosing class name, or 0 if 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 kind
      One of the KIND_* constants, recording what kind of declaration this class record was written from. The reader compares this against the real TypeElement'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.ByteOrder became a real enum in JDK 26 after being a plain class through JDK 25) -- see BinaryStubReader#applyClassRecord.
    • declAnnos

      public int[] declAnnos
      Annotation-pool indices of the declaration annotations on this class.
    • fields

      public BinaryStubData.FieldRecord[] fields
      Field records for the annotated fields of this class.
    • methods

      public BinaryStubData.MethodRecord[] methods
      Method and constructor records for the annotated methods of this class.
    • presenceOnlyMethodSigs

      public int[] presenceOnlyMethodSigs
      Indices into BinaryStubData.stringPool of the simple signatures of this class's unannotated stub-declared methods, written in place of an all-empty BinaryStubData.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; see BinaryStubWriter#omitUnannotatedMembers.

    • typeParams

      public BinaryStubData.TypeParamRecord[] typeParams
      Per-type-parameter annotation records for this class. Element i holds the annotations for the i-th type parameter declared by this class.
    • components

      public BinaryStubData.ComponentRecord[] 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

      public BinaryStubData.TypeAnno[][] 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 -- matching AnnotationFileParser's RecordStub#componentsInCanonicalConstructor override. null if the record has no such explicit constructor.
  • Constructor Details

    • ClassRecord

      public ClassRecord()
      Creates an empty ClassRecord; fields are populated by the binary reader.