Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Calendar;
- public class Functions {
- public String getTypeAttribute(Class clazz, String field) throws Exception {
- String[] fields = field.replace(".", ",").split(",");
- String type = null;
- for(int i = 0; i < fields.length; i++) {
- type = clazz.getDeclaredField(fields[i]).getType().getSimpleName();
- clazz = clazz.getDeclaredField(fields[i]).getType();
- }
- return type;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement