aboutsummaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorTing-Yuan Huang <laszio@google.com>2021-05-07 01:05:09 -0700
committerlaszio <ting-yuan@users.noreply.github.com>2021-05-11 16:36:38 -0700
commitfc3abf9946db5b3c07c36dd92dfc7c8fb5b32bbe (patch)
treeee87ad03581f1537135f2bcb80c3f79479998c7d /api
parent8589a96883f03cd403d15001dd95813f31877b4e (diff)
downloadksp-fc3abf9946db5b3c07c36dd92dfc7c8fb5b32bbe.tar.gz
Split Origin.CLASS into KOTLIN_LIB and JAVA_LIB
For KSAnnotationDescriptor, check whether the underlying descripter is JavaAnnotationDescriptor. For KSDeclarationDescriptorImpl, KSPropertyAccessorDescriptorImpl and KSValueParameterDescriptorImpl, check whether they are contained by JavaClassDescriptor. For KSTypeReferenceDescriptorImpl, KSClassifierReferenceDescriptorImpl and KSTypeArgumentDescriptorImpl, specify the origin in their creation appropriately. Most of time it is the same as where they are created. The only exception is when it's created for type arguemnts from KotlinType. In that case it is SYNTHETIC.
Diffstat (limited to 'api')
-rw-r--r--api/src/main/kotlin/com/google/devtools/ksp/symbol/Origin.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/api/src/main/kotlin/com/google/devtools/ksp/symbol/Origin.kt b/api/src/main/kotlin/com/google/devtools/ksp/symbol/Origin.kt
index d4e686ee..5112a121 100644
--- a/api/src/main/kotlin/com/google/devtools/ksp/symbol/Origin.kt
+++ b/api/src/main/kotlin/com/google/devtools/ksp/symbol/Origin.kt
@@ -20,7 +20,8 @@ package com.google.devtools.ksp.symbol
enum class Origin {
KOTLIN,
- CLASS,
+ KOTLIN_LIB,
JAVA,
+ JAVA_LIB,
SYNTHETIC
}