@Test public void testAliasProperty() { assertEquals("person", alias(Person.class, Alias::label)); assertNull(alias(locations, Alias::key)); }
public static String alias(AnnotatedElement element, Function<Alias, String> property) { Alias alias = element.getAnnotation(Alias.class); if (alias == null) { return null; } String value = property.apply(alias); return isNotEmpty(value) ? value : null; }
Fields { public static String alias(AnnotatedElement element, Function<Alias, String> property) { Alias alias = element.getAnnotation(Alias.class); if (alias == null) { return null; } String value = property.apply(alias); return isNotEmpty(value) ? value : null; } }
Fields { public static String alias(AnnotatedElement element, Function<Alias, String> property) { Alias alias = element.getAnnotation(Alias.class); if (alias == null) { return null; } String value = property.apply(alias); return isNotEmpty(value) ? value : null; } private  Fields(); }
Fields { public static String alias(AnnotatedElement element, Function<Alias, String> property) { Alias alias = element.getAnnotation(Alias.class); if (alias == null) { return null; } String value = property.apply(alias); return isNotEmpty(value) ? value : null; } private  Fields(); static boolean has(Field field, Class<? extends Annotation> annotationType); static String alias(AnnotatedElement element, Function<Alias, String> property); static String propertyKey(Field field); @SneakyThrows static Object propertyValue(Field field, Object instance); static Field field(E element, String fieldName); static Field field(Class<E> elementType, String fieldName); static List<Field> fields(E element); static List<Field> fields(E element, Predicate<Field> predicate); static List<Field> fields(Class<E> elementType); static List<Field> fields(Class<E> elementType,
      Predicate<Field> predicate); static Class<?> listType(Field field); static boolean isSimple(Field field); }
Fields { public static String alias(AnnotatedElement element, Function<Alias, String> property) { Alias alias = element.getAnnotation(Alias.class); if (alias == null) { return null; } String value = property.apply(alias); return isNotEmpty(value) ? value : null; } private  Fields(); static boolean has(Field field, Class<? extends Annotation> annotationType); static String alias(AnnotatedElement element, Function<Alias, String> property); static String propertyKey(Field field); @SneakyThrows static Object propertyValue(Field field, Object instance); static Field field(E element, String fieldName); static Field field(Class<E> elementType, String fieldName); static List<Field> fields(E element); static List<Field> fields(E element, Predicate<Field> predicate); static List<Field> fields(Class<E> elementType); static List<Field> fields(Class<E> elementType,
      Predicate<Field> predicate); static Class<?> listType(Field field); static boolean isSimple(Field field); static long elementCacheSize; static final Comparator<Field> BY_NAME; static final Comparator<Field> BY_KEYS; }