Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Conversation

@pyricau
Copy link
Contributor

@pyricau pyricau commented Mar 5, 2013

See #272.

The Otto integration is a thin layer.

Here is how it works : if @Subscribe or @Produce is used on methods in an AndroidAnnotations annotated class, then these methods gets overridden in the generated subclass. AndroidAnnotations performs checks based on what Otto expects (public methods, return type, etc), and adds compile errors for faster feedback.

The overriding methods are annotated with the corresponding annotation, and delegate to super.

pyricau added a commit that referenced this pull request Mar 5, 2013
@pyricau pyricau merged commit 2aa295e into develop Mar 5, 2013
@pyricau pyricau deleted the 272_Otto_integration branch March 5, 2013 14:27
@mathieuboniface
Copy link
Contributor

👍

@bishopmatthew
Copy link

Is this in the 3.0-SNAPSHOT maven repo? I changed my pom.xml to use 3.0-SNAPSHOT, enabled the snapshot repo, changed the annotation compiler to use the 3.0-SNASHOT jars (I'm using IntelliJ), and rebuilt all the generated classes, but I don't see my @Subscribe methods being overriden in the generated classes.

EDIT: if anyone made the same mistake I did, I forgot to change the groupId from com.googlecode.androidannotations to org.androidannotations. Apparently there is a 3.0-SNAPSHOT for the old groupId, but it doesn't have this commit.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants