Summary: This document provides information about the extension providing support for Kotlin Programming Language.
Please see Kotlin 1.0 - Release Notes for more information.
In what situation should you install this extension?
If your application contains Kotlin source code and you want to view these object types and their links with other objects, then you should install this extension. All files with the .kt extension are analyzed.
Kotlin code and Java code may coexist in the same application, and a Kotlin method may call a Java method, and inversely. If a JEE analysis is defined for the Application, call links from Kotlin methods to Java methods should be created. But links from Java methods to Kotlin methods are not supported yet: this is a limitation.
Function Point, Quality and Sizing support
- Function Points (transactions): a green tick indicates that OMG Function Point counting and Transaction Risk Index are supported
- Quality and Sizing: a green tick indicates that CAST can measure size and that a minimum set of Quality Rules exist
|Quality and Sizing|
CAST AIP compatibility
|CAST AIP release||Supported|
Supported DBMS servers
This extension is compatible with the following DBMS servers:
|CSS / PostgreSQL|
Supported Kotlin versions
This extension is compatible with the following Kotlin versions:
|An installation of any compatible release of CAST AIP (see table above)|
Download and installation instructions
The latest release status of this extension can be seen when downloading it from the CAST Extend server.
Packaging, delivering and analyzing your source code
Once the extension is installed, no further configuration changes are required before you can package your source code and run an analysis. The process of packaging, delivering and analyzing your source code is as follows:
A discoverer is provided together with the extension to automatically detect Kotlin code. One Kotlin project will be discovered for the package's root folder when at least one .kt files is detected in the root folder or any sub-folders.
Packaging and delivery
Using the CAST Delivery Manager Tool, create a new Version and create a new Package for your Kotlin source code using the Files on your file system option:
Click to enlarge
Define a name for the package and the root folder of your Application source code:
Click to enlarge
Run the Package action: a Kotlin project will be discovered for the package's root folder when .kt files are detected in the root folder or any sub-folders:
Deliver the Version
Analysis configuration in the CAST Management Studio
Accept and deploy the Version in the CAST Management Studio. In the Current Version tab, An Analysis Unit will be created automatically related to the Kotlin source code whenever a Kotlin project has been detected by the CAST Delivery Manager Tool. In addition, if your Kotlin related source code is part of a larger application, then other Analysis Units may also be created automatically:
If you need to manually create an Analysis Unit, you can do so as follows:
In the Current Version tab, add a new Analysis Unit specifically for your .kt files, selecting the Add new Universal Analysis Unit option:
Edit the new Analysis Unit and configure in the Source Settings tab:
- A name for the Analysis Unit
- Ensure you tick the Kotlin option
- Define the location of the deployed .kt files (the CAST Management Studio will locate this automatically in the Deployment folder):
What results can you expect?
Once the analysis/snapshot generation has completed, you can view the results in the normal manner.
The following libraries are supported for Web Service HTTP calls:
Once the Kotlin extension analysis is finished, the analyzer will output the final number of web service calls created.
This code produces Web Service HTTP calls
Spring http operation (since version 1.0.3-funcrel)
This code produces Web Service HTTP operations.
Supported annotations are @GetMapping, @PostMapping, @PutMapping, @DeleteMapping.
Spring beans (since version 1.0.3-funcrel)
give following links:
give following links:
Spring jdbc (since version 1.0.3-funcrel)
Only links to database procedures are supported.
gives following link:
The following objects are displayed in CAST Enlighten:
|Kotlin anonymous class|
|Kotlin class / Kotlin generic class / Kotlin JVM class / Kotlin JVM generic class|
|Kotlin function / Kotlin JVM method|
|Kotlin generic interface / Kotlin interface|
|Kotlin instantiated class|
|Kotlin Get HttpRequest Service|
|Kotlin Post HttpRequest Service|
|Kotlin Delete HttpRequest Service|
|Kotlin Put HttpRequest Service|
|Kotlin Web service Get Operation|
|Kotlin Web service Post Operation|
|Kotlin Web service Put Operation|
|Kotlin Web service Delete Operation|
The following structural rules are provided:
You can also find a global list here:
- Links from java methods to Kotlin methods are not supported.