Skip to content

Add the helpers of KSP in semantic-ksp-helper - #126

Merged
reactivestudio merged 11 commits into
facade-ksp-client-rulesfrom
ksp-helper-module
Nov 16, 2026
Merged

reactivestudio merged 11 commits into
facade-ksp-client-rulesfrom
ksp-helper-module

Conversation

@reactivestudio

@reactivestudio reactivestudio commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Новый модуль semantic-ksp-helper (idiom/ksp/helper) — общие расширения над API KSP для процессоров семейств. KSP подключён как compileOnly. Имена — по образцу утилит KSP и Java reflection: get…, has…, is…, resolve….

  • KSAnnotated.getFirstAnnotationOrNull(KClass), hasAnnotation(KClass) — аннотация по полному имени класса, в том числе под typealias. Встроенные getAnnotationsByType и isAnnotationPresent сравнивают короткое имя и алиас не видят.
  • KSAnnotation.resolveClassDeclaration() — объявление класса аннотации с раскрытым алиасом.
  • KSAnnotation.getTypeValues(argumentName) — типы в значении аргумента (Ledger::class, Ledger.class); одиночное значение из Java — тоже список.
  • KSTypeReference.getReferencedClasses() — классы, на которые ссылается тип: аргументы, алиасы, границы параметров; цикл T : Comparable<T> обходится один раз.
  • KSClassDeclaration.getDeclaredClasses() — классы, объявленные непосредственно в классе, как Class.getDeclaredClasses().
  • KSDeclaration.getShortName(), getQualifiedName(), isSynthetic().

semantic-pattern-ksp здесь не меняется: перевод процессора Facade на модуль — следующим PR.

@reactivestudio
reactivestudio force-pushed the facade-ksp-client-rules branch from 3464cd7 to f8d0551 Compare November 16, 2026 12:15
@reactivestudio
reactivestudio merged commit e600ec4 into facade-ksp-client-rules Nov 16, 2026
1 check passed
@reactivestudio
reactivestudio deleted the ksp-helper-module branch November 16, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant