private <A extends Annotation> A getAnyAnnotation(BeanPropertyDefinition prop, Class<A> acls) {
			if (prop == null) {
				return null;
			}

			if (prop.getField() != null) {
				return prop.getField().getAnnotation(acls);
			}
			if (prop.getGetter() != null) {
				return prop.getGetter().getAnnotation(acls);
			}
			if (prop.getSetter() != null) {
				return prop.getSetter().getAnnotation(acls);
			}

			return null;
		}
Type determined from the primary member for the property being built.
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/PolymorphicModelConverter.java