I want to create a mini ORM(Object Relational Mapping) for android if some one of you have used Hibernate which is also an ORM but not for mobile in which you can create Class to Table mapping by using annotations.
What i want to create my annotations in android and than read that class by reflection and create tables.
in standard java i am able to create my annotations and use it. but for android i could not found any way to create annotations in android This project using custom annotations but i could not found how.
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
These above Meta-Annotations are available in standard java but not in android which help to create annotations
any help please
What makes you think that these annotations are not available in Android? ORMLite is a Java ORM for Android that uses annotations without problem:
I also use
METHODretention elsewhere. Here’s the source code for @DatabaseField that compiles fine under all Android versions that I’ve tried (1.6 up through 3.0).One thing to remember about annotations with Android is that their performance is terrible. See: