@Test public void testGetI18NKey() { Assertions.assertNull(PropUtils.getI18nKey(Integer.class, "class")); Assertions.assertEquals(PropUtils.getI18nKey(TestProp.class, "property"), i18nKey); }
public static String getI18nKey(final Class<?> clazz, final String property) { final PropertyInfo info = get(clazz, property); if (info == null) { log.error("PropertyInfo not found for field '" + clazz.getName() + "." + property + "' not found."); return null; } return info.i18nKey(); }
PropUtils { public static String getI18nKey(final Class<?> clazz, final String property) { final PropertyInfo info = get(clazz, property); if (info == null) { log.error("PropertyInfo not found for field '" + clazz.getName() + "." + property + "' not found."); return null; } return info.i18nKey(); } }
PropUtils { public static String getI18nKey(final Class<?> clazz, final String property) { final PropertyInfo info = get(clazz, property); if (info == null) { log.error("PropertyInfo not found for field '" + clazz.getName() + "." + property + "' not found."); return null; } return info.i18nKey(); }  }
PropUtils { public static String getI18nKey(final Class<?> clazz, final String property) { final PropertyInfo info = get(clazz, property); if (info == null) { log.error("PropertyInfo not found for field '" + clazz.getName() + "." + property + "' not found."); return null; } return info.i18nKey(); }  static PropertyInfo get(final Class<?> clazz, final String property); static PropertyInfo get(final Field field); static Field getField(final Class<?> clazz, final String property); static Field getField(final Class<?> clazz, final String property, boolean suppressWarning); static String getI18nKey(final Class<?> clazz, final String property); static Field[] getPropertyInfoFields(final Class<?> clazz); }
PropUtils { public static String getI18nKey(final Class<?> clazz, final String property) { final PropertyInfo info = get(clazz, property); if (info == null) { log.error("PropertyInfo not found for field '" + clazz.getName() + "." + property + "' not found."); return null; } return info.i18nKey(); }  static PropertyInfo get(final Class<?> clazz, final String property); static PropertyInfo get(final Field field); static Field getField(final Class<?> clazz, final String property); static Field getField(final Class<?> clazz, final String property, boolean suppressWarning); static String getI18nKey(final Class<?> clazz, final String property); static Field[] getPropertyInfoFields(final Class<?> clazz);  }