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.

Annotation Support

See original GitHub issue

Hey, this looks like a great library, and I have been exploring using it. I know you guys have quite done quite a bit of research regarding Anotations vs Method Naming, but overall I really feel like Annotations are a much cleaner and more flexible solution.

I added annotations to my local branch. You can create a new EventBus that uses annotations like this new EventBus(DeclarationType.ANNOTATIONS). Then you can subscribe to receive events on any method like this:

@Subscribe public void onMyEvent(CustomEvent e)

This uses the caller chooses thread method. We can also change this by adding an argument.

@Subscribe(threadMode = ThreadMode.Background) public void onMyEvent(CustomEvent e)

This uses the background thread and is definitely a more explicit syntax.

Here is a link to my repo where I implemented the changes. https://github.com/rjbrock/EventBus

I would still need to add unit tests before submitting a pull request so I just wanted to see what your thoughts were first.

Rick

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:23 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
lordcodescommented, Nov 24, 2016

This feature is implemented and can be closed.

0reactions
jymotcommented, Oct 27, 2015

Awesome!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Data Annotation Services & Labeling Outsourcing For ...
We provide data annotation and labeling outsourcing services for machine ... Data Annotation & Tagging for Image Recognition ... Why Annotation Support?
Read more >
Improve code inspection with annotations - Android Developers
When used with code inspections tools, annotations can help you detect problems, such as null pointer exceptions and resource type conflicts. Android supports...
Read more >
AnnotationSupport (JUnit 5.0.0 API)
Find all repeatable annotations of annotationType that are either present, indirectly present, or meta-present on the supplied AnnotatedElement . This method ...
Read more >
Annotation Support | Facebook
Annotation Support is a professional annotation services provider offering 15+ types of annotations. Page · Information Technology Company.
Read more >
Annotation Support - LinkedIn
Annotation Support offer the following Annotation services: Bounding Box, Polygon, 3D LiDAR, Geospatial, Line Annotation, Data Labeling, Image Tagging, ...
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