зеркало из https://github.com/github/codeql.git
Merge pull request #9703 from igfoo/igfoo/generated
Kotlin: Record more kinds of elements as compiler-generated
This commit is contained in:
Коммит
861a368734
|
@ -595,6 +595,8 @@ open class KotlinFileExtractor(
|
|||
tw.writeMethods(clinitId, "<clinit>", "<clinit>()", returnType.javaResult.id, parentId, clinitId)
|
||||
tw.writeMethodsKotlinType(clinitId, returnType.kotlinResult.id)
|
||||
|
||||
tw.writeCompiler_generated(clinitId, CompilerGeneratedKinds.CLASS_INITIALISATION_METHOD.kind)
|
||||
|
||||
val locId = tw.getWholeFileLocation()
|
||||
tw.writeHasLocation(clinitId, locId)
|
||||
|
||||
|
@ -780,6 +782,14 @@ open class KotlinFileExtractor(
|
|||
val methodId = id.cast<DbMethod>()
|
||||
tw.writeMethods(methodId, shortName.nameInDB, "${shortName.nameInDB}$paramsSignature", returnType.javaResult.id, parentId, sourceDeclaration.cast<DbMethod>())
|
||||
tw.writeMethodsKotlinType(methodId, returnType.kotlinResult.id)
|
||||
when (f.origin) {
|
||||
IrDeclarationOrigin.GENERATED_DATA_CLASS_MEMBER ->
|
||||
tw.writeCompiler_generated(methodId, CompilerGeneratedKinds.GENERATED_DATA_CLASS_MEMBER.kind)
|
||||
IrDeclarationOrigin.DEFAULT_PROPERTY_ACCESSOR ->
|
||||
tw.writeCompiler_generated(methodId, CompilerGeneratedKinds.DEFAULT_PROPERTY_ACCESSOR.kind)
|
||||
IrDeclarationOrigin.ENUM_CLASS_SPECIAL_MEMBER ->
|
||||
tw.writeCompiler_generated(methodId, CompilerGeneratedKinds.ENUM_CLASS_SPECIAL_MEMBER.kind)
|
||||
}
|
||||
|
||||
if (extractMethodAndParameterTypeAccesses) {
|
||||
extractTypeAccessRecursive(substReturnType, locId, id, -1)
|
||||
|
@ -1070,7 +1080,7 @@ open class KotlinFileExtractor(
|
|||
tw.writeKtLocalFunction(ids.function)
|
||||
|
||||
if (s.origin == IrDeclarationOrigin.ADAPTER_FOR_CALLABLE_REFERENCE) {
|
||||
tw.writeCompiler_generated(classId, 1)
|
||||
tw.writeCompiler_generated(classId, CompilerGeneratedKinds.DECLARING_CLASSES_OF_ADAPTER_FUNCTIONS.kind)
|
||||
}
|
||||
} else {
|
||||
logger.errorElement("Expected to find local function", s)
|
||||
|
@ -4367,4 +4377,12 @@ open class KotlinFileExtractor(
|
|||
declarationStack.pop()
|
||||
}
|
||||
}
|
||||
|
||||
private enum class CompilerGeneratedKinds(val kind: Int) {
|
||||
DECLARING_CLASSES_OF_ADAPTER_FUNCTIONS(1),
|
||||
GENERATED_DATA_CLASS_MEMBER(2),
|
||||
DEFAULT_PROPERTY_ACCESSOR(3),
|
||||
CLASS_INITIALISATION_METHOD(4),
|
||||
ENUM_CLASS_SPECIAL_MEMBER(5)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1211,10 +1211,15 @@ ktPropertyDelegates(
|
|||
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
|
||||
// 1: Declaring classes of adapter functions in Kotlin
|
||||
)
|
||||
|
||||
ktFunctionOriginalNames(
|
||||
|
|
|
@ -44,6 +44,21 @@ class Element extends @element, Top {
|
|||
|
||||
/** Holds if this is an auxiliary program element generated by the compiler. */
|
||||
predicate isCompilerGenerated() { compiler_generated(this, _) }
|
||||
|
||||
/** Gets the reason this element was generated by the compiler, if any. */
|
||||
string compilerGeneratedReason() {
|
||||
exists(int i | compiler_generated(this, i) |
|
||||
i = 1 and result = "Declaring classes of adapter functions in Kotlin"
|
||||
or
|
||||
i = 2 and result = "Generated data class member"
|
||||
or
|
||||
i = 3 and result = "Default property accessor"
|
||||
or
|
||||
i = 4 and result = "Class initialisation method <clinit>"
|
||||
or
|
||||
i = 5 and result = "Enum class special member"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
1228
java/ql/lib/upgrades/57c55f404a5954f0e738febf590ad5d49dd67b08/semmlecode.dbscheme
Executable file
1228
java/ql/lib/upgrades/57c55f404a5954f0e738febf590ad5d49dd67b08/semmlecode.dbscheme
Executable file
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,2 @@
|
|||
description: Add more compiler-generated kinds
|
||||
compatibility: full
|
|
@ -1 +1,2 @@
|
|||
| clinit.kt:0:0:0:0 | <clinit> | file://:0:0:0:0 | void |
|
||||
| enumClass.kt:0:0:0:0 | <clinit> | file://:0:0:0:0 | void |
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
data class DataClass(val x: Int, var y: String)
|
|
@ -0,0 +1,4 @@
|
|||
enum class EnumClass(val v: Int) {
|
||||
enum1(1),
|
||||
enum2(1)
|
||||
}
|
|
@ -12,6 +12,127 @@
|
|||
| clinit.kt:3:1:3:24 | int | TypeAccess |
|
||||
| clinit.kt:3:1:3:24 | int | TypeAccess |
|
||||
| clinit.kt:3:24:3:24 | 0 | IntegerLiteral |
|
||||
| dataClass.kt:0:0:0:0 | 31 | IntegerLiteral |
|
||||
| dataClass.kt:0:0:0:0 | "..." | StringTemplateExpr |
|
||||
| dataClass.kt:0:0:0:0 | (...)... | CastExpr |
|
||||
| dataClass.kt:0:0:0:0 | ) | StringLiteral |
|
||||
| dataClass.kt:0:0:0:0 | , | StringLiteral |
|
||||
| dataClass.kt:0:0:0:0 | ... !is ... | NotInstanceOfExpr |
|
||||
| dataClass.kt:0:0:0:0 | ... (value not-equals) ... | ValueNEExpr |
|
||||
| dataClass.kt:0:0:0:0 | ... (value not-equals) ... | ValueNEExpr |
|
||||
| dataClass.kt:0:0:0:0 | ... == ... | EQExpr |
|
||||
| dataClass.kt:0:0:0:0 | ...=... | AssignExpr |
|
||||
| dataClass.kt:0:0:0:0 | DataClass | TypeAccess |
|
||||
| dataClass.kt:0:0:0:0 | DataClass | TypeAccess |
|
||||
| dataClass.kt:0:0:0:0 | DataClass | TypeAccess |
|
||||
| dataClass.kt:0:0:0:0 | DataClass | TypeAccess |
|
||||
| dataClass.kt:0:0:0:0 | DataClass( | StringLiteral |
|
||||
| dataClass.kt:0:0:0:0 | Object | TypeAccess |
|
||||
| dataClass.kt:0:0:0:0 | String | TypeAccess |
|
||||
| dataClass.kt:0:0:0:0 | String | TypeAccess |
|
||||
| dataClass.kt:0:0:0:0 | boolean | TypeAccess |
|
||||
| dataClass.kt:0:0:0:0 | false | BooleanLiteral |
|
||||
| dataClass.kt:0:0:0:0 | false | BooleanLiteral |
|
||||
| dataClass.kt:0:0:0:0 | false | BooleanLiteral |
|
||||
| dataClass.kt:0:0:0:0 | hashCode(...) | MethodAccess |
|
||||
| dataClass.kt:0:0:0:0 | hashCode(...) | MethodAccess |
|
||||
| dataClass.kt:0:0:0:0 | int | TypeAccess |
|
||||
| dataClass.kt:0:0:0:0 | int | TypeAccess |
|
||||
| dataClass.kt:0:0:0:0 | new DataClass(...) | ClassInstanceExpr |
|
||||
| dataClass.kt:0:0:0:0 | other | VarAccess |
|
||||
| dataClass.kt:0:0:0:0 | other | VarAccess |
|
||||
| dataClass.kt:0:0:0:0 | other | VarAccess |
|
||||
| dataClass.kt:0:0:0:0 | plus(...) | MethodAccess |
|
||||
| dataClass.kt:0:0:0:0 | result | LocalVariableDeclExpr |
|
||||
| dataClass.kt:0:0:0:0 | result | VarAccess |
|
||||
| dataClass.kt:0:0:0:0 | result | VarAccess |
|
||||
| dataClass.kt:0:0:0:0 | result | VarAccess |
|
||||
| dataClass.kt:0:0:0:0 | this | ThisAccess |
|
||||
| dataClass.kt:0:0:0:0 | this | ThisAccess |
|
||||
| dataClass.kt:0:0:0:0 | this | ThisAccess |
|
||||
| dataClass.kt:0:0:0:0 | this | ThisAccess |
|
||||
| dataClass.kt:0:0:0:0 | this | ThisAccess |
|
||||
| dataClass.kt:0:0:0:0 | this | ThisAccess |
|
||||
| dataClass.kt:0:0:0:0 | this | ThisAccess |
|
||||
| dataClass.kt:0:0:0:0 | this | ThisAccess |
|
||||
| dataClass.kt:0:0:0:0 | this | ThisAccess |
|
||||
| dataClass.kt:0:0:0:0 | this.x | VarAccess |
|
||||
| dataClass.kt:0:0:0:0 | this.x | VarAccess |
|
||||
| dataClass.kt:0:0:0:0 | this.x | VarAccess |
|
||||
| dataClass.kt:0:0:0:0 | this.x | VarAccess |
|
||||
| dataClass.kt:0:0:0:0 | this.y | VarAccess |
|
||||
| dataClass.kt:0:0:0:0 | this.y | VarAccess |
|
||||
| dataClass.kt:0:0:0:0 | this.y | VarAccess |
|
||||
| dataClass.kt:0:0:0:0 | this.y | VarAccess |
|
||||
| dataClass.kt:0:0:0:0 | times(...) | MethodAccess |
|
||||
| dataClass.kt:0:0:0:0 | tmp0_other_with_cast | LocalVariableDeclExpr |
|
||||
| dataClass.kt:0:0:0:0 | tmp0_other_with_cast | VarAccess |
|
||||
| dataClass.kt:0:0:0:0 | tmp0_other_with_cast | VarAccess |
|
||||
| dataClass.kt:0:0:0:0 | tmp0_other_with_cast.x | VarAccess |
|
||||
| dataClass.kt:0:0:0:0 | tmp0_other_with_cast.y | VarAccess |
|
||||
| dataClass.kt:0:0:0:0 | true | BooleanLiteral |
|
||||
| dataClass.kt:0:0:0:0 | true | BooleanLiteral |
|
||||
| dataClass.kt:0:0:0:0 | when ... | WhenExpr |
|
||||
| dataClass.kt:0:0:0:0 | when ... | WhenExpr |
|
||||
| dataClass.kt:0:0:0:0 | when ... | WhenExpr |
|
||||
| dataClass.kt:0:0:0:0 | when ... | WhenExpr |
|
||||
| dataClass.kt:0:0:0:0 | x | VarAccess |
|
||||
| dataClass.kt:0:0:0:0 | x= | StringLiteral |
|
||||
| dataClass.kt:0:0:0:0 | y | VarAccess |
|
||||
| dataClass.kt:0:0:0:0 | y= | StringLiteral |
|
||||
| dataClass.kt:1:22:1:31 | ...=... | KtInitializerAssignExpr |
|
||||
| dataClass.kt:1:22:1:31 | int | TypeAccess |
|
||||
| dataClass.kt:1:22:1:31 | int | TypeAccess |
|
||||
| dataClass.kt:1:22:1:31 | int | TypeAccess |
|
||||
| dataClass.kt:1:22:1:31 | int | TypeAccess |
|
||||
| dataClass.kt:1:22:1:31 | this | ThisAccess |
|
||||
| dataClass.kt:1:22:1:31 | this.x | VarAccess |
|
||||
| dataClass.kt:1:22:1:31 | x | VarAccess |
|
||||
| dataClass.kt:1:22:1:31 | x | VarAccess |
|
||||
| dataClass.kt:1:34:1:46 | ...=... | AssignExpr |
|
||||
| dataClass.kt:1:34:1:46 | ...=... | KtInitializerAssignExpr |
|
||||
| dataClass.kt:1:34:1:46 | <set-?> | VarAccess |
|
||||
| dataClass.kt:1:34:1:46 | String | TypeAccess |
|
||||
| dataClass.kt:1:34:1:46 | String | TypeAccess |
|
||||
| dataClass.kt:1:34:1:46 | String | TypeAccess |
|
||||
| dataClass.kt:1:34:1:46 | String | TypeAccess |
|
||||
| dataClass.kt:1:34:1:46 | String | TypeAccess |
|
||||
| dataClass.kt:1:34:1:46 | Unit | TypeAccess |
|
||||
| dataClass.kt:1:34:1:46 | this | ThisAccess |
|
||||
| dataClass.kt:1:34:1:46 | this | ThisAccess |
|
||||
| dataClass.kt:1:34:1:46 | this.y | VarAccess |
|
||||
| dataClass.kt:1:34:1:46 | this.y | VarAccess |
|
||||
| dataClass.kt:1:34:1:46 | y | VarAccess |
|
||||
| dataClass.kt:1:34:1:46 | y | VarAccess |
|
||||
| enumClass.kt:0:0:0:0 | EnumClass | TypeAccess |
|
||||
| enumClass.kt:0:0:0:0 | EnumClass | TypeAccess |
|
||||
| enumClass.kt:0:0:0:0 | EnumClass[] | TypeAccess |
|
||||
| enumClass.kt:0:0:0:0 | String | TypeAccess |
|
||||
| enumClass.kt:1:1:4:1 | EnumClass | TypeAccess |
|
||||
| enumClass.kt:1:1:4:1 | Unit | TypeAccess |
|
||||
| enumClass.kt:1:1:4:1 | new Enum(...) | ClassInstanceExpr |
|
||||
| enumClass.kt:1:22:1:31 | ...=... | KtInitializerAssignExpr |
|
||||
| enumClass.kt:1:22:1:31 | int | TypeAccess |
|
||||
| enumClass.kt:1:22:1:31 | int | TypeAccess |
|
||||
| enumClass.kt:1:22:1:31 | int | TypeAccess |
|
||||
| enumClass.kt:1:22:1:31 | this | ThisAccess |
|
||||
| enumClass.kt:1:22:1:31 | this.v | VarAccess |
|
||||
| enumClass.kt:1:22:1:31 | v | VarAccess |
|
||||
| enumClass.kt:1:22:1:31 | v | VarAccess |
|
||||
| enumClass.kt:2:5:2:13 | ...=... | KtInitializerAssignExpr |
|
||||
| enumClass.kt:2:5:2:13 | EnumClass | TypeAccess |
|
||||
| enumClass.kt:2:5:2:13 | EnumClass | TypeAccess |
|
||||
| enumClass.kt:2:5:2:13 | EnumClass | TypeAccess |
|
||||
| enumClass.kt:2:5:2:13 | EnumClass.enum1 | VarAccess |
|
||||
| enumClass.kt:2:5:2:13 | new EnumClass(...) | ClassInstanceExpr |
|
||||
| enumClass.kt:2:11:2:11 | 1 | IntegerLiteral |
|
||||
| enumClass.kt:3:5:3:12 | ...=... | KtInitializerAssignExpr |
|
||||
| enumClass.kt:3:5:3:12 | EnumClass | TypeAccess |
|
||||
| enumClass.kt:3:5:3:12 | EnumClass | TypeAccess |
|
||||
| enumClass.kt:3:5:3:12 | EnumClass | TypeAccess |
|
||||
| enumClass.kt:3:5:3:12 | EnumClass.enum2 | VarAccess |
|
||||
| enumClass.kt:3:5:3:12 | new EnumClass(...) | ClassInstanceExpr |
|
||||
| enumClass.kt:3:11:3:11 | 1 | IntegerLiteral |
|
||||
| methods2.kt:4:1:5:1 | Unit | TypeAccess |
|
||||
| methods2.kt:4:26:4:31 | int | TypeAccess |
|
||||
| methods2.kt:4:34:4:39 | int | TypeAccess |
|
||||
|
|
|
@ -1,24 +1,39 @@
|
|||
methods
|
||||
| clinit.kt:0:0:0:0 | ClinitKt | clinit.kt:0:0:0:0 | <clinit> | <clinit>() | |
|
||||
| clinit.kt:0:0:0:0 | ClinitKt | clinit.kt:3:1:3:24 | getTopLevelInt | getTopLevelInt() | public, static |
|
||||
| clinit.kt:0:0:0:0 | ClinitKt | clinit.kt:3:1:3:24 | setTopLevelInt | setTopLevelInt(int) | public, static |
|
||||
| methods2.kt:0:0:0:0 | Methods2Kt | methods2.kt:4:1:5:1 | fooBarTopLevelMethod | fooBarTopLevelMethod(int,int) | public, static |
|
||||
| methods2.kt:7:1:10:1 | Class2 | methods2.kt:8:5:9:5 | fooBarClassMethod | fooBarClassMethod(int,int) | public |
|
||||
| methods3.kt:0:0:0:0 | Methods3Kt | methods3.kt:3:1:3:42 | fooBarTopLevelMethodExt | fooBarTopLevelMethodExt(int,int) | public, static |
|
||||
| methods3.kt:5:1:7:1 | Class3 | methods3.kt:6:5:6:46 | fooBarTopLevelMethodExt | fooBarTopLevelMethodExt(int,int) | public |
|
||||
| methods4.kt:5:3:9:3 | InsideNestedTest | methods4.kt:7:5:7:34 | m | m(foo.bar.NestedTest.InsideNestedTest) | public |
|
||||
| methods5.kt:0:0:0:0 | Methods5Kt | methods5.kt:3:1:11:1 | x | x() | public, static |
|
||||
| methods5.kt:5:3:5:27 | | methods5.kt:5:3:5:27 | a | a(int) | public |
|
||||
| methods5.kt:9:3:9:32 | | methods5.kt:9:3:9:32 | f1 | f1(foo.bar.C1,int) | public |
|
||||
| methods.kt:0:0:0:0 | MethodsKt | methods.kt:2:1:3:1 | topLevelMethod | topLevelMethod(int,int) | public, static |
|
||||
| methods.kt:5:1:19:1 | Class | methods.kt:6:5:7:5 | classMethod | classMethod(int,int) | public |
|
||||
| methods.kt:5:1:19:1 | Class | methods.kt:9:5:12:5 | anotherClassMethod | anotherClassMethod(int,int) | public |
|
||||
| methods.kt:5:1:19:1 | Class | methods.kt:14:12:14:29 | publicFun | publicFun() | public |
|
||||
| methods.kt:5:1:19:1 | Class | methods.kt:15:15:15:35 | protectedFun | protectedFun() | protected |
|
||||
| methods.kt:5:1:19:1 | Class | methods.kt:16:13:16:31 | privateFun | privateFun() | private |
|
||||
| methods.kt:5:1:19:1 | Class | methods.kt:17:14:17:33 | internalFun | internalFun() | internal |
|
||||
| methods.kt:5:1:19:1 | Class | methods.kt:18:5:18:36 | noExplicitVisibilityFun | noExplicitVisibilityFun() | public |
|
||||
| clinit.kt:0:0:0:0 | ClinitKt | clinit.kt:0:0:0:0 | <clinit> | <clinit>() | | Compiler generated |
|
||||
| clinit.kt:0:0:0:0 | ClinitKt | clinit.kt:3:1:3:24 | getTopLevelInt | getTopLevelInt() | public, static | Compiler generated |
|
||||
| clinit.kt:0:0:0:0 | ClinitKt | clinit.kt:3:1:3:24 | setTopLevelInt | setTopLevelInt(int) | public, static | Compiler generated |
|
||||
| dataClass.kt:1:1:1:47 | DataClass | dataClass.kt:0:0:0:0 | component1 | component1() | public | Compiler generated |
|
||||
| dataClass.kt:1:1:1:47 | DataClass | dataClass.kt:0:0:0:0 | component2 | component2() | public | Compiler generated |
|
||||
| dataClass.kt:1:1:1:47 | DataClass | dataClass.kt:0:0:0:0 | copy | copy(int,java.lang.String) | public | Compiler generated |
|
||||
| dataClass.kt:1:1:1:47 | DataClass | dataClass.kt:0:0:0:0 | equals | equals(java.lang.Object) | override, public | Compiler generated |
|
||||
| dataClass.kt:1:1:1:47 | DataClass | dataClass.kt:0:0:0:0 | hashCode | hashCode() | override, public | Compiler generated |
|
||||
| dataClass.kt:1:1:1:47 | DataClass | dataClass.kt:0:0:0:0 | toString | toString() | override, public | Compiler generated |
|
||||
| dataClass.kt:1:1:1:47 | DataClass | dataClass.kt:1:22:1:31 | getX | getX() | public | Compiler generated |
|
||||
| dataClass.kt:1:1:1:47 | DataClass | dataClass.kt:1:34:1:46 | getY | getY() | public | Compiler generated |
|
||||
| dataClass.kt:1:1:1:47 | DataClass | dataClass.kt:1:34:1:46 | setY | setY(java.lang.String) | public | Compiler generated |
|
||||
| enumClass.kt:1:1:4:1 | EnumClass | enumClass.kt:0:0:0:0 | <clinit> | <clinit>() | | Compiler generated |
|
||||
| enumClass.kt:1:1:4:1 | EnumClass | enumClass.kt:0:0:0:0 | valueOf | valueOf(java.lang.String) | public, static | Compiler generated |
|
||||
| enumClass.kt:1:1:4:1 | EnumClass | enumClass.kt:0:0:0:0 | values | values() | public, static | Compiler generated |
|
||||
| enumClass.kt:1:1:4:1 | EnumClass | enumClass.kt:1:22:1:31 | getV | getV() | public | Compiler generated |
|
||||
| methods2.kt:0:0:0:0 | Methods2Kt | methods2.kt:4:1:5:1 | fooBarTopLevelMethod | fooBarTopLevelMethod(int,int) | public, static | |
|
||||
| methods2.kt:7:1:10:1 | Class2 | methods2.kt:8:5:9:5 | fooBarClassMethod | fooBarClassMethod(int,int) | public | |
|
||||
| methods3.kt:0:0:0:0 | Methods3Kt | methods3.kt:3:1:3:42 | fooBarTopLevelMethodExt | fooBarTopLevelMethodExt(int,int) | public, static | |
|
||||
| methods3.kt:5:1:7:1 | Class3 | methods3.kt:6:5:6:46 | fooBarTopLevelMethodExt | fooBarTopLevelMethodExt(int,int) | public | |
|
||||
| methods4.kt:5:3:9:3 | InsideNestedTest | methods4.kt:7:5:7:34 | m | m(foo.bar.NestedTest.InsideNestedTest) | public | |
|
||||
| methods5.kt:0:0:0:0 | Methods5Kt | methods5.kt:3:1:11:1 | x | x() | public, static | |
|
||||
| methods5.kt:5:3:5:27 | | methods5.kt:5:3:5:27 | a | a(int) | public | |
|
||||
| methods5.kt:9:3:9:32 | | methods5.kt:9:3:9:32 | f1 | f1(foo.bar.C1,int) | public | |
|
||||
| methods.kt:0:0:0:0 | MethodsKt | methods.kt:2:1:3:1 | topLevelMethod | topLevelMethod(int,int) | public, static | |
|
||||
| methods.kt:5:1:19:1 | Class | methods.kt:6:5:7:5 | classMethod | classMethod(int,int) | public | |
|
||||
| methods.kt:5:1:19:1 | Class | methods.kt:9:5:12:5 | anotherClassMethod | anotherClassMethod(int,int) | public | |
|
||||
| methods.kt:5:1:19:1 | Class | methods.kt:14:12:14:29 | publicFun | publicFun() | public | |
|
||||
| methods.kt:5:1:19:1 | Class | methods.kt:15:15:15:35 | protectedFun | protectedFun() | protected | |
|
||||
| methods.kt:5:1:19:1 | Class | methods.kt:16:13:16:31 | privateFun | privateFun() | private | |
|
||||
| methods.kt:5:1:19:1 | Class | methods.kt:17:14:17:33 | internalFun | internalFun() | internal | |
|
||||
| methods.kt:5:1:19:1 | Class | methods.kt:18:5:18:36 | noExplicitVisibilityFun | noExplicitVisibilityFun() | public | |
|
||||
constructors
|
||||
| dataClass.kt:1:1:1:47 | DataClass | dataClass.kt:1:6:1:47 | DataClass | DataClass(int,java.lang.String) |
|
||||
| enumClass.kt:1:1:4:1 | EnumClass | enumClass.kt:1:6:4:1 | EnumClass | EnumClass(int) |
|
||||
| methods2.kt:7:1:10:1 | Class2 | methods2.kt:7:1:10:1 | Class2 | Class2() |
|
||||
| methods3.kt:5:1:7:1 | Class3 | methods3.kt:5:1:7:1 | Class3 | Class3() |
|
||||
| methods4.kt:3:1:11:1 | NestedTest | methods4.kt:3:1:11:1 | NestedTest | NestedTest() |
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
import java
|
||||
|
||||
query predicate methods(RefType declType, Method m, string signature, string modifiers) {
|
||||
query predicate methods(
|
||||
RefType declType, Method m, string signature, string modifiers, string compilerGenerated
|
||||
) {
|
||||
m.fromSource() and
|
||||
declType = m.getDeclaringType() and
|
||||
signature = m.getSignature() and
|
||||
modifiers = concat(string s | m.hasModifier(s) | s, ", ")
|
||||
modifiers = concat(string s | m.hasModifier(s) | s, ", ") and
|
||||
if m.isCompilerGenerated()
|
||||
then compilerGenerated = "Compiler generated"
|
||||
else compilerGenerated = ""
|
||||
}
|
||||
|
||||
query predicate constructors(RefType declType, Constructor c, string signature) {
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
| clinit.kt:3:1:3:24 | setTopLevelInt | clinit.kt:3:1:3:24 | <set-?> | 0 |
|
||||
| dataClass.kt:0:0:0:0 | copy | dataClass.kt:1:22:1:31 | x | 0 |
|
||||
| dataClass.kt:0:0:0:0 | copy | dataClass.kt:1:34:1:46 | y | 1 |
|
||||
| dataClass.kt:0:0:0:0 | equals | dataClass.kt:0:0:0:0 | other | 0 |
|
||||
| dataClass.kt:1:34:1:46 | setY | dataClass.kt:1:34:1:46 | <set-?> | 0 |
|
||||
| enumClass.kt:0:0:0:0 | valueOf | enumClass.kt:0:0:0:0 | value | 0 |
|
||||
| methods2.kt:4:1:5:1 | fooBarTopLevelMethod | methods2.kt:4:26:4:31 | x | 0 |
|
||||
| methods2.kt:4:1:5:1 | fooBarTopLevelMethod | methods2.kt:4:34:4:39 | y | 1 |
|
||||
| methods2.kt:8:5:9:5 | fooBarClassMethod | methods2.kt:8:27:8:32 | x | 0 |
|
||||
|
|
|
@ -230,4 +230,12 @@ modifiers
|
|||
| reflection.kt:126:9:126:13 | ...::... | reflection.kt:126:9:126:13 | invoke | override |
|
||||
| reflection.kt:126:9:126:13 | ...::... | reflection.kt:126:9:126:13 | invoke | public |
|
||||
compGenerated
|
||||
| file://<external>/Class2.class:0:0:0:0 | getValue | 3 |
|
||||
| file://<external>/Class2.class:0:0:0:0 | getValue | 3 |
|
||||
| reflection.kt:33:9:33:23 | getP0 | 3 |
|
||||
| reflection.kt:34:9:34:23 | getP1 | 3 |
|
||||
| reflection.kt:34:9:34:23 | setP1 | 3 |
|
||||
| reflection.kt:83:17:83:28 | getValue | 3 |
|
||||
| reflection.kt:105:18:105:31 | getProp1 | 3 |
|
||||
| reflection.kt:105:18:105:31 | setProp1 | 3 |
|
||||
| reflection.kt:126:9:126:13 | | 1 |
|
||||
|
|
Загрузка…
Ссылка в новой задаче