Comments (3)
The compiler provides the ability to call methods through Kotlin types that are not declared in them, but are present in platform Java types.
There are 3 kind of declarations that come from mapping J2K in the JVM platform:
- approved by the Kotlin team;
- hidden and it is impossible to call them;
- can be called, but the call will be marked deprecated.
Example:
getFirst
is from JDK 21 in java.util.List
In the first possible solution, Dokka should show only declarations approved by the Kotlin team.
from dokka.
The list of such functions with their status is here.
The list of mapped types is here
In K2, there is a class that is responsible for providing a mapped Java scope. Also, see
wrapScopeWithJvmMapped
from dokka.
Dokka should filter out filter out such methods from documentation since:
-
they have no available doc;
-
In K1, we experience some inconsistencies during the analysis of stdlib.
For example, Collection does not contain such methods (e.g. spliterator, stream, parallelStream), but its inheritors (AbstractMutableCollection) do. It seems Dokka will have the similar situation in K2.
The long-term solution in K2 is blocked by https://youtrack.jetbrains.com/issue/KT-69796/Analysis-API-Provide-a-way-to-detect-mapped-methods-from-JVM
The short-term one is to support a manual list of such methods in a Documentable filter. e.g. vmishenev/kotlin@8997a9a
from dokka.
Related Issues (20)
- Color of the filter button after enabling it updates with a delay on mobile
- Don't show title if content is unavailable for selected filter
- Rework Tabs component
- Rework navbar component according to new design
- [K2] Java synthetic properties in Kotlin inheritor class shown with `open` modifier HOT 1
- [K2] Incorrect signature in synthetic property for Java field with a private setter HOT 1
- [K2] Properties inherited from Java fields/synthetic properties with types that can be nullable shown as nullable
- [K2] Methods implemented by delegation miss the KDoc
- [K2] Incorrect `override` modifier for a method that inherited as is
- Java Doc comments not getting reflected for overridden methods in java classes
- [K2] Link to an inherited declaration in `@see` block replace class container to parent one in link label
- [K2] Unresolved declarations are resolved in KDoc HOT 2
- [K2] Overriden methods in enum entries are not rendered HOT 1
- CustomTagContentProvider for multi-tags
- [K2] KMP: `Multiple pages associated with key` reported for an actual class overriding method from java parent
- [K2] In case of multiple inheritance overriden methods from superclass missed HOT 1
- [K2] Synthetic property misses annotations from getter/setter HOT 2
- Support rich documentation of property parameters.
- Dokka migration to KGP 2.1 leads to `Non-public primary constructor is exposed via the generated 'copy()' method of the 'data' class.`
- Make older versions dir name configurable
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dokka.