/** * An invocation of the compiler. Note that more than one file may be * compiled per invocation. For example, this command compiles three * source files: * * javac A.java B.java C.java * * The `id` simply identifies the invocation, while `cwd` is the working * directory from which the compiler was invoked. */ compilations( /** * An invocation of the compiler. Note that more than one file may * be compiled per invocation. For example, this command compiles * three source files: * * javac A.java B.java C.java */ unique int id : @compilation, int kind: int ref, string cwd : string ref, string name : string ref ); /** * Indicates whether this was a Java or Kotlin compilation. */ case @compilation.kind of 1 = @javacompilation | 2 = @kotlincompilation ; /** * This indicates that extraction has started for this compilation. * There will be a corresponding compilation_finished row once * extraction has completed. If there is no compilation_finished row * then the extractor did not terminate properly. */ compilation_started( int id : @compilation ref ) /** * This provides ad-hoc information about a compilation. For example, * key "Annotation processors enabled" and value "true", or * key "Used annotation processor" and value * "lombok.launch.AnnotationProcessorHider$AnnotationProcessor". */ compilation_info( int id : @compilation ref, string info_key: string ref, string info_value: string ref ) /** * The arguments that were passed to the extractor for a compiler * invocation. If `id` is for the compiler invocation * * javac A.java B.java C.java * * then typically there will be rows for * * num | arg * --- | --- * 0 | *path to extractor* * 1 | `--javac-args` * 2 | A.java * 3 | B.java * 4 | C.java */ #keyset[id, num] compilation_args( int id : @compilation ref, int num : int ref, string arg : string ref ); /** * The expanded arguments that were passed to the extractor for a * compiler invocation. This is similar to `compilation_args`, but * for a `@@@someFile` argument, it includes the arguments from that * file, rather than just taking the argument literally. */ #keyset[id, num] compilation_expanded_args( int id : @compilation ref, int num : int ref, string arg : string ref ); /** * The source files that are compiled by a compiler invocation. * If `id` is for the compiler invocation * * javac A.java B.java C.java * * then there will be rows for * * num | arg * --- | --- * 0 | A.java * 1 | B.java * 2 | C.java */ #keyset[id, num] compilation_compiling_files( int id : @compilation ref, int num : int ref, int file : @file ref ); /** * For each file recorded in `compilation_compiling_files`, * there will be a corresponding row in * `compilation_compiling_files_completed` once extraction * of that file is complete. The `result` will indicate the * extraction result: * * 0: Successfully extracted * 1: Errors were encountered, but extraction recovered * 2: Errors were encountered, and extraction could not recover */ #keyset[id, num] compilation_compiling_files_completed( int id : @compilation ref, int num : int ref, int result : int ref ); /** * The time taken by the extractor for a compiler invocation. * * For each file `num`, there will be rows for * * kind | seconds * ---- | --- * 1 | CPU seconds used by the extractor frontend * 2 | Elapsed seconds during the extractor frontend * 3 | CPU seconds used by the extractor backend * 4 | Elapsed seconds during the extractor backend */ #keyset[id, num, kind] compilation_time( int id : @compilation ref, int num : int ref, /* kind: 1 = frontend_cpu_seconds 2 = frontend_elapsed_seconds 3 = extractor_cpu_seconds 4 = extractor_elapsed_seconds */ int kind : int ref, float seconds : float ref ); /** * The `cpu_seconds` and `elapsed_seconds` are the CPU time and elapsed * time (respectively) that the original compilation (not the extraction) * took for compiler invocation `id`. */ compilation_compiler_times( unique int id : @compilation ref, float cpu_seconds : float ref, float elapsed_seconds : float ref ); /** * If extraction was successful, then `cpu_seconds` and * `elapsed_seconds` are the CPU time and elapsed time (respectively) * that extraction took for compiler invocation `id`. * The `result` will indicate the extraction result: * * 0: Successfully extracted * 1: Errors were encountered, but extraction recovered * 2: Errors were encountered, and extraction could not recover */ compilation_finished( unique int id : @compilation ref, float cpu_seconds : float ref, float elapsed_seconds : float ref, int result : int ref ); /** * An error or warning generated by the extractor. */ diagnostics( unique int id: @diagnostic, string generated_by: string ref, // TODO: Sync this with the other languages? int severity: int ref, string error_tag: string ref, string error_message: string ref, string full_error_message: string ref, int location: @location_default ref ); /** * Where a diagnostic was generated. A diagnostic may not have a row * here if it can't be connected to a particular file. * The diagnostic message `diagnostic` was generated during compiler * invocation `compilation`, and is the `file_number_diagnostic_number`th * message generated while extracting the `file_number`th file of that * invocation. */ #keyset[compilation, file_number, file_number_diagnostic_number] diagnostic_for( unique int diagnostic : @diagnostic ref, int compilation : @compilation ref, int file_number : int ref, int file_number_diagnostic_number : int ref ); /** * External data, loaded from CSV files during database creation. * The `path` is the filename of the CSV file, and each row in the file * has its own `id`. Within that row, `column` is the (0-based) index * of the column, and `value` is the contents of that cell. */ externalData( int id : @externalDataElement, string path : string ref, int column: int ref, string value : string ref ); /** * The path to the source code. * Anything outside this path is considered to be 3rd party code. */ sourceLocationPrefix( string prefix : string ref ); /* * SMAP */ smap_header( int outputFileId: @file ref, string outputFilename: string ref, string defaultStratum: string ref ); smap_files( int outputFileId: @file ref, string stratum: string ref, int inputFileNum: int ref, string inputFileName: string ref, int inputFileId: @file ref ); smap_lines( int outputFileId: @file ref, string stratum: string ref, int inputFileNum: int ref, int inputStartLine: int ref, int inputLineCount: int ref, int outputStartLine: int ref, int outputLineIncrement: int ref ); /* * Locations and files */ @location = @location_default ; /** * The location of an element. * The location spans column `startcolumn` of line `startline` to * column `endcolumn` of line `endline` in file `file`. * For more information, see * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). */ locations_default( unique int id: @location_default, int file: @file ref, int beginLine: int ref, int beginColumn: int ref, int endLine: int ref, int endColumn: int ref ); /** * The element `locatableid` has location `id`. */ hasLocation( int locatableid: @locatable ref, int id: @location ref ); @sourceline = @locatable ; /** * The total number of lines (`num_lines`), * number of lines containing code (`num_code`) and * number of lines containing comments (`num_comment`) * in the element `element_id`. * In a modern database, this element will be a source * file, class or method. */ #keyset[element_id] numlines( int element_id: @sourceline ref, int num_lines: int ref, int num_code: int ref, int num_comment: int ref ); /** * `id` is the file with absolute path `name`. */ files( unique int id: @file, string name: string ref ); /** * `id` is the folder (directory) with absolute path `name`. */ folders( unique int id: @folder, string name: string ref ); @container = @folder | @file /** * Gives the parent of a container (file or folder). * Note that unintuitive parent relationships are possible; * for example, we might have the parent of the folder * `/usr/share/java/junit4.jar/junit` be the file * `/usr/share/java/junit4.jar`. */ containerparent( int parent: @container ref, unique int child: @container ref ); /* * Java */ /** * Associates a compilation unit (`.java`, `.kt` or `.class` file) * with its declared package. */ cupackage( unique int id: @file ref, int packageid: @package ref ); /** * Gives the key/value pairs from the main section of the JAR manifest * file `fileid`. */ #keyset[fileid,keyName] jarManifestMain( int fileid: @file ref, string keyName: string ref, string value: string ref ); /** * Gives the key/value pairs from the named section of the JAR manifest * file `fileid`. */ #keyset[fileid,entryName,keyName] jarManifestEntries( int fileid: @file ref, string entryName: string ref, string keyName: string ref, string value: string ref ); /** * Gives the ID for the package name `nodeName`. */ packages( unique int id: @package, string nodeName: string ref ); /** * Gives the ID for the primitive type (e.g. `void`, `int`, or * ``) `nodeName`. */ primitives( unique int id: @primitive, string nodeName: string ref ); /** * Gives the ID for the modifier (e.g. `public` or `static`) `nodeName`. */ modifiers( unique int id: @modifier, string nodeName: string ref ); /** * An errortype is used when the extractor is unable to extract a type * correctly for some reason. */ error_type( unique int id: @errortype ); /** * A class or interface `nodeName`, in the package `parentid`. * The `nodeName` will be of the form `Foo` for the source * class, and `sourceid` will equal `id`. * For non-generic classes this same `id` will be the class used in * types. * For generic classes, there will be separate `id`s for the raw type * (with `nodeName` `Foo<>`), and instantiations (with `nodeName` * `Foo`). In both cases, the `sourceid` will be the `id` of * the corresponding source class. * For nested classes, `nodeName` is only the name of the nested * class itself. To get the full name, including the name of the * outer class, the outer class needs to be looked up via the * `enclInReftype` relation. */ classes_or_interfaces( unique int id: @classorinterface, string nodeName: string ref, int parentid: @package ref, int sourceid: @classorinterface ref ); /** * This holds for classes that are Kotlin file classes, i.e. classes * that are generated to contain top-level Kotlin declarations such as * functions that are not otherwise within a JVM class. */ file_class( int id: @classorinterface ref ); /** * For a Kotlin object expression `object MyObject { ... }`, a JVM class * is generated that has a `public static final MyObject INSTANCE` * field. This table links the class to the field, and thus * identifies the class as originating from a Kotlin object expression. */ class_object( unique int id: @classorinterface ref, unique int instance: @field ref ); /** * For a Kotlin `companion object`, this links the `id` of the class * containing the companion object to the class `companion_object` that * is generated to implement the companion, and the static field * `instance` that is generated in the containing class to refer to the * companion object. */ type_companion_object( unique int id: @classorinterface ref, unique int instance: @field ref, unique int companion_object: @classorinterface ref ); kt_nullable_types( unique int id: @kt_nullable_type, int classid: @reftype ref ) kt_notnull_types( unique int id: @kt_notnull_type, int classid: @reftype ref ) kt_type_alias( unique int id: @kt_type_alias, string name: string ref, int kttypeid: @kt_type ref ) @kt_type = @kt_nullable_type | @kt_notnull_type /** * This holds if `id` is an `interface`, rather than a `class`. */ isInterface( unique int id: @classorinterface ref ); /** * This holds if `id` is a Java `record` class. */ isRecord( unique int id: @classorinterface ref ); /** * This holds if `id` is a field declaration in `parentid`. * In Java, a single declaration may declare multiple fields. */ fielddecls( unique int id: @fielddecl, int parentid: @reftype ref ); /** * The `pos`th (0-based) field declared in `fieldDeclId` is `fieldId`. */ #keyset[fieldId] #keyset[fieldDeclId,pos] fieldDeclaredIn( int fieldId: @field ref, int fieldDeclId: @fielddecl ref, int pos: int ref ); /** * Defines `id` to be a field with name `nodeName` and type `typeid` * in class `parentid`. */ fields( unique int id: @field, string nodeName: string ref, int typeid: @type ref, int parentid: @reftype ref ); /** * The Kotlin type of field `id` is `kttypeid`. */ fieldsKotlinType( unique int id: @field ref, int kttypeid: @kt_type ref ); /** * A constructor `nodeName` for the reftype `parentid`. * The `nodeName` will be of the form `Foo` for the source * constructor, and `sourceid` will equal `id`. * For constructors of non-generic classes this same `id` will be the * constructor used by callers. * For generic classes, there will be separate `id`s for the raw type's * constructor (with `nodeName` `Foo<>`), and instantiations (with * `nodeName` `Foo`). In both cases, the `sourceid` will be the * `id` of the corresponding source constructor. * The `typeid` is the return type, which is always `void`. * The `signature` gives a string representation of the constructor's * signature in which all types are fully qualified, e.g. * `Constr(java.lang.Object,java.lang.String,int)`. */ constrs( unique int id: @constructor, string nodeName: string ref, string signature: string ref, int typeid: @type ref, int parentid: @reftype ref, int sourceid: @constructor ref ); constrsKotlinType( unique int id: @constructor ref, int kttypeid: @kt_type ref ); /** * A method `nodeName` that is a member of the reftype `parentid`. * The `nodeName` will be the method's name, e.g. `foo`. * For source methods, and `sourceid` will equal `id`. * For methods that are themselves generic (`public void foo(X x)`) * there is still only a source method. * For methods in generic classes, there will be separate `id`s for the * methods in different instantiations. These will all have the same * `nodeName` (e.g. `foo`), and the `sourceid` will be the `id` of the * corresponding source method. * The `typeid` is the return type. * The `signature` gives a string representation of the constructor's * signature in which all types are fully qualified, e.g. * `foo(java.lang.Object,java.lang.String,int)`. */ methods( unique int id: @method, string nodeName: string ref, string signature: string ref, int typeid: @type ref, int parentid: @reftype ref, int sourceid: @method ref ); methodsKotlinType( unique int id: @method ref, int kttypeid: @kt_type ref ); /** * The `pos`th (0-based) parameter of the callable `parentid`, with * type `typeid`. * If the callable is a source callable, then `sourceid` will equal `id`. * If the callable is not a source callable, then `sourceid` will be * the id of the corresponding parameter in its source callable. */ #keyset[parentid,pos] params( unique int id: @param, int typeid: @type ref, int pos: int ref, int parentid: @callable ref, int sourceid: @param ref ); paramsKotlinType( unique int id: @param ref, int kttypeid: @kt_type ref ); /** * The parameter `id` has name `nodeName`. * There will be no row for a particular parameter for various reasons, * such as that parameter belongs to an external declaration that we * don't have the source code for, or it is a parameter of a method in * an instantiation of a generic class. */ paramName( unique int id: @param ref, string nodeName: string ref ); /** * Holds if `param` is a var args parameter, such as `bar` in * ``` * void myMethod(String foo, String... bar) {} * ``` * in Java code, or in * ``` * fun myMethod(foo: String, vararg bar: String) {} * ``` * in Kotlin code. */ isVarargsParam( int param: @param ref ); exceptions( unique int id: @exception, int typeid: @type ref, int parentid: @callable ref ); isAnnotType( int interfaceid: @classorinterface ref ); isAnnotElem( int methodid: @method ref ); annotValue( int parentid: @annotation ref, int id2: @method ref, unique int value: @expr ref ); isEnumType( int classid: @classorinterface ref ); isEnumConst( int fieldid: @field ref ); #keyset[parentid,pos] typeVars( unique int id: @typevariable, string nodeName: string ref, int pos: int ref, int parentid: @classorinterfaceorcallable ref ); wildcards( unique int id: @wildcard, string nodeName: string ref, int kind: int ref ); #keyset[parentid,pos] typeBounds( unique int id: @typebound, int typeid: @reftype ref, int pos: int ref, int parentid: @boundedtype ref ); #keyset[parentid,pos] typeArgs( int argumentid: @reftype ref, int pos: int ref, int parentid: @classorinterfaceorcallable ref ); isParameterized( int memberid: @member ref ); isRaw( int memberid: @member ref ); erasure( unique int memberid: @member ref, int erasureid: @member ref ); #keyset[classid] #keyset[parent] isAnonymClass( int classid: @classorinterface ref, int parent: @classinstancexpr ref ); #keyset[typeid] #keyset[parent] isLocalClassOrInterface( int typeid: @classorinterface ref, int parent: @localtypedeclstmt ref ); isDefConstr( int constructorid: @constructor ref ); #keyset[exprId] lambdaKind( int exprId: @lambdaexpr ref, int bodyKind: int ref ); isCanonicalConstr( int constructorid: @constructor ref ); arrays( unique int id: @array, string nodeName: string ref, int elementtypeid: @type ref, int dimension: int ref, int componenttypeid: @type ref ); enclInReftype( unique int child: @reftype ref, int parent: @reftype ref ); extendsReftype( int id1: @reftype ref, int id2: @classorinterface ref ); implInterface( int id1: @classorarray ref, int id2: @classorinterface ref ); permits( int id1: @classorinterface ref, int id2: @classorinterface ref ); hasModifier( int id1: @modifiable ref, int id2: @modifier ref ); imports( unique int id: @import, int holder: @classorinterfaceorpackage ref, string name: string ref, int kind: int ref ); #keyset[parent,idx] stmts( unique int id: @stmt, int kind: int ref, int parent: @stmtparent ref, int idx: int ref, int bodydecl: @callable ref ); @stmtparent = @callable | @stmt | @switchexpr | @whenexpr| @stmtexpr; case @stmt.kind of 0 = @block | 1 = @ifstmt | 2 = @forstmt | 3 = @enhancedforstmt | 4 = @whilestmt | 5 = @dostmt | 6 = @trystmt | 7 = @switchstmt | 8 = @synchronizedstmt | 9 = @returnstmt | 10 = @throwstmt | 11 = @breakstmt | 12 = @continuestmt | 13 = @emptystmt | 14 = @exprstmt | 15 = @labeledstmt | 16 = @assertstmt | 17 = @localvariabledeclstmt | 18 = @localtypedeclstmt | 19 = @constructorinvocationstmt | 20 = @superconstructorinvocationstmt | 21 = @case | 22 = @catchclause | 23 = @yieldstmt | 24 = @errorstmt | 25 = @whenbranch ; #keyset[parent,idx] exprs( unique int id: @expr, int kind: int ref, int typeid: @type ref, int parent: @exprparent ref, int idx: int ref ); exprsKotlinType( unique int id: @expr ref, int kttypeid: @kt_type ref ); callableEnclosingExpr( unique int id: @expr ref, int callable_id: @callable ref ); statementEnclosingExpr( unique int id: @expr ref, int statement_id: @stmt ref ); isParenthesized( unique int id: @expr ref, int parentheses: int ref ); case @expr.kind of 1 = @arrayaccess | 2 = @arraycreationexpr | 3 = @arrayinit | 4 = @assignexpr | 5 = @assignaddexpr | 6 = @assignsubexpr | 7 = @assignmulexpr | 8 = @assigndivexpr | 9 = @assignremexpr | 10 = @assignandexpr | 11 = @assignorexpr | 12 = @assignxorexpr | 13 = @assignlshiftexpr | 14 = @assignrshiftexpr | 15 = @assignurshiftexpr | 16 = @booleanliteral | 17 = @integerliteral | 18 = @longliteral | 19 = @floatingpointliteral | 20 = @doubleliteral | 21 = @characterliteral | 22 = @stringliteral | 23 = @nullliteral | 24 = @mulexpr | 25 = @divexpr | 26 = @remexpr | 27 = @addexpr | 28 = @subexpr | 29 = @lshiftexpr | 30 = @rshiftexpr | 31 = @urshiftexpr | 32 = @andbitexpr | 33 = @orbitexpr | 34 = @xorbitexpr | 35 = @andlogicalexpr | 36 = @orlogicalexpr | 37 = @ltexpr | 38 = @gtexpr | 39 = @leexpr | 40 = @geexpr | 41 = @eqexpr | 42 = @neexpr | 43 = @postincexpr | 44 = @postdecexpr | 45 = @preincexpr | 46 = @predecexpr | 47 = @minusexpr | 48 = @plusexpr | 49 = @bitnotexpr | 50 = @lognotexpr | 51 = @castexpr | 52 = @newexpr | 53 = @conditionalexpr | 54 = @parexpr // deprecated | 55 = @instanceofexpr | 56 = @localvariabledeclexpr | 57 = @typeliteral | 58 = @thisaccess | 59 = @superaccess | 60 = @varaccess | 61 = @methodaccess | 62 = @unannotatedtypeaccess | 63 = @arraytypeaccess | 64 = @packageaccess | 65 = @wildcardtypeaccess | 66 = @declannotation | 67 = @uniontypeaccess | 68 = @lambdaexpr | 69 = @memberref | 70 = @annotatedtypeaccess | 71 = @typeannotation | 72 = @intersectiontypeaccess | 73 = @switchexpr | 74 = @errorexpr | 75 = @whenexpr | 76 = @getclassexpr | 77 = @safecastexpr | 78 = @implicitcastexpr | 79 = @implicitnotnullexpr | 80 = @implicitcoerciontounitexpr | 81 = @notinstanceofexpr | 82 = @stmtexpr | 83 = @stringtemplateexpr | 84 = @notnullexpr | 85 = @unsafecoerceexpr | 86 = @valueeqexpr | 87 = @valueneexpr | 88 = @propertyref | 89 = @recordpatternexpr ; /** Holds if this `when` expression was written as an `if` expression. */ when_if(unique int id: @whenexpr ref); /** Holds if this `when` branch was written as an `else` branch. */ when_branch_else(unique int id: @whenbranch ref); @classinstancexpr = @newexpr | @lambdaexpr | @memberref | @propertyref @annotation = @declannotation | @typeannotation @typeaccess = @unannotatedtypeaccess | @annotatedtypeaccess @assignment = @assignexpr | @assignop; @unaryassignment = @postincexpr | @postdecexpr | @preincexpr | @predecexpr; @assignop = @assignaddexpr | @assignsubexpr | @assignmulexpr | @assigndivexpr | @assignremexpr | @assignandexpr | @assignorexpr | @assignxorexpr | @assignlshiftexpr | @assignrshiftexpr | @assignurshiftexpr; @literal = @booleanliteral | @integerliteral | @longliteral | @floatingpointliteral | @doubleliteral | @characterliteral | @stringliteral | @nullliteral; @binaryexpr = @mulexpr | @divexpr | @remexpr | @addexpr | @subexpr | @lshiftexpr | @rshiftexpr | @urshiftexpr | @andbitexpr | @orbitexpr | @xorbitexpr | @andlogicalexpr | @orlogicalexpr | @ltexpr | @gtexpr | @leexpr | @geexpr | @eqexpr | @neexpr | @valueeqexpr | @valueneexpr; @unaryexpr = @postincexpr | @postdecexpr | @preincexpr | @predecexpr | @minusexpr | @plusexpr | @bitnotexpr | @lognotexpr | @notnullexpr; @caller = @classinstancexpr | @methodaccess | @constructorinvocationstmt | @superconstructorinvocationstmt; callableBinding( unique int callerid: @caller ref, int callee: @callable ref ); memberRefBinding( unique int id: @expr ref, int callable: @callable ref ); propertyRefGetBinding( unique int id: @expr ref, int getter: @callable ref ); propertyRefFieldBinding( unique int id: @expr ref, int field: @field ref ); propertyRefSetBinding( unique int id: @expr ref, int setter: @callable ref ); @exprparent = @stmt | @expr | @whenbranch | @callable | @field | @fielddecl | @classorinterface | @param | @localvar | @typevariable; variableBinding( unique int expr: @varaccess ref, int variable: @variable ref ); @variable = @localscopevariable | @field; @localscopevariable = @localvar | @param; localvars( unique int id: @localvar, string nodeName: string ref, int typeid: @type ref, int parentid: @localvariabledeclexpr ref ); localvarsKotlinType( unique int id: @localvar ref, int kttypeid: @kt_type ref ); @namedexprorstmt = @breakstmt | @continuestmt | @labeledstmt | @literal; namestrings( string name: string ref, string value: string ref, unique int parent: @namedexprorstmt ref ); /* * Modules */ #keyset[name] modules( unique int id: @module, string name: string ref ); isOpen( int id: @module ref ); #keyset[fileId] cumodule( int fileId: @file ref, int moduleId: @module ref ); @directive = @requires | @exports | @opens | @uses | @provides #keyset[directive] directives( int id: @module ref, int directive: @directive ref ); requires( unique int id: @requires, int target: @module ref ); isTransitive( int id: @requires ref ); isStatic( int id: @requires ref ); exports( unique int id: @exports, int target: @package ref ); exportsTo( int id: @exports ref, int target: @module ref ); opens( unique int id: @opens, int target: @package ref ); opensTo( int id: @opens ref, int target: @module ref ); uses( unique int id: @uses, string serviceInterface: string ref ); provides( unique int id: @provides, string serviceInterface: string ref ); providesWith( int id: @provides ref, string serviceImpl: string ref ); isNullDefaultCase( int id: @case ref ); /* * Javadoc */ javadoc( unique int id: @javadoc ); isNormalComment( int commentid : @javadoc ref ); isEolComment( int commentid : @javadoc ref ); hasJavadoc( int documentableid: @member ref, int javadocid: @javadoc ref ); #keyset[parentid,idx] javadocTag( unique int id: @javadocTag, string name: string ref, int parentid: @javadocParent ref, int idx: int ref ); #keyset[parentid,idx] javadocText( unique int id: @javadocText, string text: string ref, int parentid: @javadocParent ref, int idx: int ref ); @javadocParent = @javadoc | @javadocTag; @javadocElement = @javadocTag | @javadocText; @classorinterfaceorpackage = @classorinterface | @package; @classorinterfaceorcallable = @classorinterface | @callable; @boundedtype = @typevariable | @wildcard; @reftype = @classorinterface | @array | @boundedtype | @errortype; @classorarray = @classorinterface | @array; @type = @primitive | @reftype; @callable = @method | @constructor; /** A program element that has a name. */ @element = @package | @modifier | @annotation | @errortype | @locatableElement; @locatableElement = @file | @primitive | @classorinterface | @method | @constructor | @param | @exception | @field | @boundedtype | @array | @localvar | @expr | @stmt | @import | @fielddecl | @kt_type | @kt_type_alias | @kt_property; @modifiable = @member_modifiable| @param | @localvar | @typevariable; @member_modifiable = @classorinterface | @method | @constructor | @field | @kt_property; @member = @method | @constructor | @field | @reftype ; /** A program element that has a location. */ @locatable = @typebound | @javadoc | @javadocTag | @javadocText | @xmllocatable | @ktcomment | @locatableElement; @top = @element | @locatable | @folder; /* * XML Files */ xmlEncoding( unique int id: @file ref, string encoding: string ref ); xmlDTDs( unique int id: @xmldtd, string root: string ref, string publicId: string ref, string systemId: string ref, int fileid: @file ref ); xmlElements( unique int id: @xmlelement, string name: string ref, int parentid: @xmlparent ref, int idx: int ref, int fileid: @file ref ); xmlAttrs( unique int id: @xmlattribute, int elementid: @xmlelement ref, string name: string ref, string value: string ref, int idx: int ref, int fileid: @file ref ); xmlNs( int id: @xmlnamespace, string prefixName: string ref, string URI: string ref, int fileid: @file ref ); xmlHasNs( int elementId: @xmlnamespaceable ref, int nsId: @xmlnamespace ref, int fileid: @file ref ); xmlComments( unique int id: @xmlcomment, string text: string ref, int parentid: @xmlparent ref, int fileid: @file ref ); xmlChars( unique int id: @xmlcharacters, string text: string ref, int parentid: @xmlparent ref, int idx: int ref, int isCDATA: int ref, int fileid: @file ref ); @xmlparent = @file | @xmlelement; @xmlnamespaceable = @xmlelement | @xmlattribute; xmllocations( int xmlElement: @xmllocatable ref, int location: @location_default ref ); @xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; /* * configuration files with key value pairs */ configs( unique int id: @config ); configNames( unique int id: @configName, int config: @config ref, string name: string ref ); configValues( unique int id: @configValue, int config: @config ref, string value: string ref ); configLocations( int locatable: @configLocatable ref, int location: @location_default ref ); @configLocatable = @config | @configName | @configValue; ktComments( unique int id: @ktcomment, int kind: int ref, string text : string ref ) ktCommentSections( unique int id: @ktcommentsection, int comment: @ktcomment ref, string content : string ref ) ktCommentSectionNames( unique int id: @ktcommentsection ref, string name : string ref ) ktCommentSectionSubjectNames( unique int id: @ktcommentsection ref, string subjectname : string ref ) #keyset[id, owner] ktCommentOwners( int id: @ktcomment ref, int owner: @top ref ) ktExtensionFunctions( unique int id: @method ref, int typeid: @type ref, int kttypeid: @kt_type ref ) ktProperties( unique int id: @kt_property, string nodeName: string ref ) ktPropertyGetters( unique int id: @kt_property ref, int getter: @method ref ) ktPropertySetters( unique int id: @kt_property ref, int setter: @method ref ) ktPropertyBackingFields( unique int id: @kt_property ref, int backingField: @field ref ) ktSyntheticBody( unique int id: @callable ref, int kind: int ref // 1: ENUM_VALUES // 2: ENUM_VALUEOF // 3: ENUM_ENTRIES ) ktLocalFunction( unique int id: @method ref ) ktInitializerAssignment( unique int id: @assignexpr ref ) ktPropertyDelegates( unique int id: @kt_property ref, unique int variableId: @variable ref ) /** * If `id` is a compiler generated element, then the kind indicates the * reason that the compiler generated it. * See `Element.compilerGeneratedReason()` for an explanation of what * each `kind` means. */ compiler_generated( unique int id: @element ref, int kind: int ref ) ktFunctionOriginalNames( unique int id: @method ref, string name: string ref ) ktDataClasses( unique int id: @classorinterface ref )