Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Use Kotlin @IntDef as an alternative for Command enum classes #18

@hawkinsji

Description

@hawkinsji

Is your feature request related to a problem? Please describe.

Suppose I have an enum class for commands and keys that can be sent between the JavaScript and Kotlin layers. An enum class is a stringless approach for that.
There are some common commands and keys that are implemented in the Captive Web View library. It’d be nice to have an enum subclass in the app, with additional commands that are specific to the app. However Kotlin doesn’t support enum subclasses.

Describe the solution you'd like

There should be a solution based on Kotlin @IntDef so that subclassing can be utilised.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions