Java annotation processing to KSP reference
Java | Closest facility in KSP | Notes |
---|---|---|
|
| |
|
| |
|
| |
|
| |
|
| KSP doesn't model packages as program elements |
|
| |
|
| |
|
| |
|
| |
|
|
KSP requires explicit type resolution, so some functionalities in Java can only be carried out by KSType
and the corresponding elements before resolution.
Java | Closest facility in KSP | Notes |
---|---|---|
|
| |
|
| |
|
| |
|
| |
|
| |
|
| N/A in KSP |
| N/A in KSP | |
|
| Not exactly same as primitive type in Java |
|
| |
|
| |
|
| |
| N/A | Kotlin has only one type per catch block. |
|
|
Java | Closest facility in KSP | Notes |
---|---|---|
|
| |
|
| |
|
| |
|
| |
| ||
|
| |
|
| |
| ||
|
| Some can be found in builtins, otherwise check |
|
| |
|
| |
|
| |
| Not needed in KSP | |
|
| |
| ||
| ||
|
| Some of the |
|
|
See how functionalities of Java annotation processing API can be carried out by KSP.
Java | KSP equivalent |
---|---|
|
|
|
|
Java | KSP equivalent |
---|---|
|
|
Java | KSP equivalent |
---|---|
|
|
| To be implemented |
|
|
|
|
|
|
| Type check and cast following |
|
|
|
|
Java | KSP equivalent |
---|---|
| To be implemented |
|
|
|
|
|
|
|
|
| Not needed in Kotlin |
|
|
| Check whether parent declaration is an interface or not |
|
|
Java | KSP equivalent |
---|---|
|
|
Java | KSP equivalent |
---|---|
|
|
Java | KSP equivalent |
---|---|
|
|
|
|
|
|
| Check |
|
|
|
|
|
|
|
|
Java | KSP equivalent |
---|---|
|
|
|
|
|
|
Java | KSP equivalent |
---|---|
| To be implemented |
|
|
|
|
Java | KSP equivalent |
---|---|
|
|
Java | KSP equivalent |
---|---|
|
|
|
|
|
|
note
A
KSType
for a function is just a signature represented by theFunctionN<R, T1, T2, ..., TN>
family.
Java | KSP equivalent |
---|---|
|
|
|
|
|
|
| Not needed in Kotlin |
|
|
Java | KSP equivalent |
---|---|
|
|
Java | KSP equivalent |
---|---|
| Compare with types in |
Java | KSP equivalent |
---|---|
|
|
| To be decided. Only needed if capture is provided and explicit bound checking is needed. |
|
|
Java | KSP equivalent |
---|---|
|
|
|
|
Java | KSP equivalent |
---|---|
|
|
|
|
| To be decided, see Java Specification |
| There is constant value, not expression |
| To be implemented |
| To be implemented |
|
|
| Package not supported, while package information can be retrieved. Operation on package is not possible for KSP |
| Package not supported |
|
|
| To be implemented |
|
|
|
|
| KSP has basic |
Java | KSP equivalent |
---|---|
|
|
|
|
| Not needed |
| To be decided |
|
|
|
|
|
|
|
|
|
|
|
|
| Depending on the context, |
| Not needed, check for |
| Use |
|
|
|
|
|
|
|
|
| Not needed |