Search code examples
androidandroid-annotations

Android Annotation


It's now been around 5-6 month since I am working on android. Gone through few points and still in the process of learning. Few days back I came to know about android annotations. Great way to reduce our code and strictly concentrate on BL. But for continue learning about annotation I need stuff which I am not getting in much details. I found few of the good stuff, like simple annotation example and also github provided me few more example as here. But still I really want to dig a more deeper as far as annotation is concern. Where can i find more stuff related to Annotation? Can anybody help me in this. I know this is not directly related to programming, but ya still require help of programmers only.

Updated: I just got one more link for annotation, pasting to update users. Here the link.


Solution

  • I'm not quite sure what you're asking for exactly. AndroidAnnotation will generates a class A_ with an annotated class A. You can open A_ and see what is generated.

    If you wan't to know a little more about annotation in itself, you can check this article http://today.java.net/pub/a/today/2008/04/10/source-code-analysis-using-java-6-compiler-apis.html Quickly, annotation processing works this way :

    • Analyze a class to extract a list of methods and attributes
    • For each method and attribute, if there are annotations on them, make some stuffs (generating code, ...)

    I hope I gave you some answers.

    EDIT: If you wan't some feedbacks, me and my co-workers are using AndroidAnnotations for a big company for one year now and it works perfectly. We can really focus on functionalities.