Back to project page SORM.
The source code is released under:
MIT License
If you think the Android project SORM listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.annotation.utils; //from w w w . ja va 2 s . c om import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; import com.annotation.Index; public class SqlUtils { public static Field[] getIndexField(Class<?> cls){ Field[] fields = ReflectionUtils.getColumnFields(cls); List<Field> list = new ArrayList<Field>(); for (Field f : fields) { if (f.getAnnotation(Index.class) != null) list.add(f); } return list.toArray(new Field[]{}); } }