private static String determinePropertyName(final Class<?> type, final Method propertyMethod) { final Document document = determineDocumentNameAnnotation(type, propertyMethod); final String prefix; if (document != null && document.name() != null) { prefix = document.name(); } else { final PropertySet annotation = determinePropertySetAnnotation(type, propertyMethod); prefix = annotation != null ? annotation.value() : null; } final String property = propertyMethod.getName(); final String name = StringUtils.isNotBlank(prefix) ? prefix + '.' + property : property; return name; }
private static String determineTitle(final Class<?> type, final Method propertyMethod) { final Document document = determineDocumentTitleAnnotation(type, propertyMethod); final String title; if (document != null && document.title() != null) { title = document.title(); } else { final PropertySet annotation = determinePropertySetAnnotation(type, propertyMethod); title = annotation != null ? annotation.value() : type.getSimpleName(); } return title; }
private static String determineName(final Class<?> type, final Method propertyMethod) { final Document document = determineDocumentNameAnnotation(type, propertyMethod); final String title; if (document != null && document.name() != null) { title = document.title(); } else { final PropertySet annotation = determinePropertySetAnnotation(type, propertyMethod); title = annotation != null ? annotation.value() : type.getSimpleName(); } return title; }
private static String determinePropertyTitle(final Class<?> type, final Method propertyMethod) { final Document document = determineDocumentTitleAnnotation(type, propertyMethod); final String prefix; if (document != null && document.title() != null) { prefix = document.title(); } else { final PropertySet annotation = determinePropertySetAnnotation(type, propertyMethod); prefix = annotation != null ? annotation.value() : null; } final String property; final PropertyKeyName keyAnnotation = propertyMethod.getAnnotation(PropertyKeyName.class); if (keyAnnotation != null && keyAnnotation.value() != null) { property = keyAnnotation.value(); } else { property = propertyMethod.getName(); } final String title = prefix != null ? prefix + '.' + property : property; return title; }