Advertisement
Guest User

Untitled

a guest
Apr 20th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. Class<?> clazz = Class.forName("com.epam.pre_prod.entity." + name);
  2. clazz.getDeclaredFields();
  3. Product product = (Product) clazz.newInstance();
  4. for (Field field : clazz.getDeclaredFields()) {
  5. System.out.println(field.isAnnotationPresent(field.getName()));
  6. System.out.println(field.isAnnotationPresent(Collect.class));
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement