private static <T> Object findProperty(AnnotationRef annotationRef, String propName, Function<TypeInstance, T> convert) { // annotationRef.structuredValue().properties().get(0).values().get(0).value() for (TypeInstanceProperty typeInstanceProperty : annotationRef.structuredValue().properties()) { if (typeInstanceProperty.name().equalsIgnoreCase(propName)) { if (typeInstanceProperty.isArray()) { return toValueList(convert, typeInstanceProperty.values()); } else { return convert.apply(typeInstanceProperty.value()); } } } return null; }
private static Object findProperty(AnnotationRef annotationRef, String propName) { // annotationRef.structuredValue().properties().get(0).values().get(0).value() for (TypeInstanceProperty typeInstanceProperty : annotationRef.structuredValue().properties()) { if (typeInstanceProperty.name().equalsIgnoreCase(propName)) { if (typeInstanceProperty.isArray()) { return toValueList(typeInstanceProperty.values()); } else { return typeInstanceProperty.value().value(); } } } return null; }
private static Object findProperty(AnnotationRef annotationRef, String propName) { // annotationRef.structuredValue().properties().get(0).values().get(0).value() for (TypeInstanceProperty typeInstanceProperty : annotationRef.structuredValue().properties()) { if (typeInstanceProperty.name().equalsIgnoreCase(propName)) { if (typeInstanceProperty.isArray()) { return toValueList(typeInstanceProperty.values()); } else { return typeInstanceProperty.value().value(); } } } return null; }