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.

ArC - enhance the generated annotation literal classes

See original GitHub issue

Description

Currently, all generated annotation literals extend javax.enterprise.util.AnnotationLiteral. This is suboptimal as all functionality (including equals() and hashCode()) is implemented via the reflection API.

Implementation ideas

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Ladicekcommented, Oct 18, 2022

I’ve recently implemented a generator of equals, hashCode and toString in Gizmo, so I think I have the necessary experience to do the same here. I can’t just use the equals generator in Gizmo, because that assumes identical class, and the hashCode needs to be consistent with what AnnotationLiteral does, but it will be very similar. The toString generator could be used directly, but I’ll rather copy it and improve a few things to make it closer to AnnotationLiteral.toString output.

0reactions
mkoubacommented, Oct 13, 2022

So which annotations do we generate literals for?

Qualifiers and interceptor bindings, and also annotations of an injection point that resolves to a dependent bean that injects InjectionPoint metadata 😃. Typical runtime examples are BeanAttributes.getQualifiers() and Interceptor.getInterceptorBindings().

Read more comments on GitHub >

github_iconTop Results From Across the Web

ArC generates a lot of AnnotationLiteral resources #525 - GitHub
The problem with class loader is that we cannot share one annotation literal class for both an application consumer class and a framework...
Read more >
Create annotation feature classes—ArcGIS Pro | Documentation
Specifying a visible range for each annotation class improves performance when working with annotation. You can also specify a visible scale range in...
Read more >
Objective-C Automatic Reference Counting (ARC) - Clang
This is done using two instance methods which all classes are expected to implement: retain increases the object's reference count by 1, whereas...
Read more >
Snapping annotation leader lines to line feature endpoints ...
I am currently running ArcGIS Pro 2.6. I am attempting to snap the ends of annotation leader lines to line feature endpoints.
Read more >
Chapter 18 Annotations - Modelica Specification
The structure of the annotation content is the same as a class modification (class-modification in the grammar). (For replaceable class declarations with a ......
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