question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add ElementType.TYPE to ActorType

See original GitHub issue

Describe the proposal

Hi, I want to use the actor model with Kotlin. Currently, the ActorType annotation in java is targeted at ElementType.TYPE_USE which is incompatible with kotlin interface. Adding ElementType.TYPE to the annotation target field should work. Can we add it?

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
LionTaocommented, Nov 21, 2022

@LionTao Will you be able to contribute a PR for this change?

Of course, created #812

0reactions
LionTaocommented, Nov 21, 2022

@LionTao Could you provide some documentation link in the PR or in this issue that explains why ElementType.Type is needed for Kotlin?

According to Kotlin docs, it seems currently kotlin lacks some native java ElementType enum values.

For my project, rewriting the ActorType annotation class with ElementType.TYPE will let it annotate a kotlin interface. Otherwise, the kotlin compiler throws an error that says This annotation is not applicable to target 'interface'.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ElementType (Java Platform SE 8 ) - Oracle Help Center
The TYPE_USE constant includes type declarations and type parameter declarations as a convenience for designers of type checkers which give semantics to ...
Read more >
Issues · dapr/java-sdk - GitHub
Add ElementType.TYPE to ... Exception from Actor's method is not surfaced to the caller area/actor/client ... How to specify type with metadata of...
Read more >
How @Target(ElementType.ANNOTATION_TYPE) works
Denotes that the annotated String element, represents a logical type and ... to include to data model class simply by adding annotation @PasswordMatches:...
Read more >
java-sdk - Codecov
Fix App-IDs across examples and tests · Update docs for configuration api · Add ElementType.Type to ActorType · Bumping spring-boot-starter-web to 2.7.5(latest).
Read more >
Annotations in Java - Beknazar - Medium
Annotations are the way we can add metadata to class declaration, ... TYPE) - to use in class, interface (including annotation type), ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found