/** * Applies annotations to property's {@link XML} definition. * * @param member annotations provider * @param property property instance to be updated */ public static void apply(Annotated member, Annotation[] annotations, Schema property) { XmlElementWrapper wrapper = member.getAnnotation(XmlElementWrapper.class); if (wrapper == null) { wrapper = AnnotationsUtils.getAnnotation(XmlElementWrapper.class, annotations); } XmlAttribute attr = member.getAnnotation(XmlAttribute.class); if (attr == null) { attr = AnnotationsUtils.getAnnotation(XmlAttribute.class, annotations); } XmlElement elem = member.getAnnotation(XmlElement.class); if (elem == null) { elem = AnnotationsUtils.getAnnotation(XmlElement.class, annotations); } if (wrapper != null) { applyElement(wrapper, property); } else if (elem != null) { applyElement(elem, property); } else if (attr != null && isAttributeAllowed(property)) { applyAttribute(attr, property); } }
for (int i = 0; i < genericParameterTypes.length; i++) { final Type type = TypeFactory.defaultInstance().constructType(genericParameterTypes[i], cls); io.swagger.v3.oas.annotations.Parameter paramAnnotation = AnnotationsUtils.getAnnotation(io.swagger.v3.oas.annotations.Parameter.class, paramAnnotations[i]); Type paramType = ParameterProcessor.getParameterType(paramAnnotation, true); if (paramType == null) { AnnotatedParameter param = annotatedMethod.getParameter(i); final Type type = TypeFactory.defaultInstance().constructType(param.getParameterType(), cls); io.swagger.v3.oas.annotations.Parameter paramAnnotation = AnnotationsUtils.getAnnotation(io.swagger.v3.oas.annotations.Parameter.class, paramAnnotations[i]); Type paramType = ParameterProcessor.getParameterType(paramAnnotation, true); if (paramType == null) {
JsonIdentityInfo jsonIdentityInfo = AnnotationsUtils.getAnnotation(JsonIdentityInfo.class, annotatedType.getCtxAnnotations()); if (jsonIdentityInfo == null) { jsonIdentityInfo = type.getRawClass().getAnnotation(JsonIdentityInfo.class); JsonIdentityReference jsonIdentityReference = AnnotationsUtils.getAnnotation(JsonIdentityReference.class, annotatedType.getCtxAnnotations()); if (jsonIdentityReference == null) { jsonIdentityReference = type.getRawClass().getAnnotation(JsonIdentityReference.class);
/** * Applies annotations to property's {@link XML} definition. * * @param member annotations provider * @param property property instance to be updated */ public static void apply(Annotated member, Annotation[] annotations, Schema property) { XmlElementWrapper wrapper = member.getAnnotation(XmlElementWrapper.class); if (wrapper == null) { wrapper = AnnotationsUtils.getAnnotation(XmlElementWrapper.class, annotations); } XmlAttribute attr = member.getAnnotation(XmlAttribute.class); if (attr == null) { attr = AnnotationsUtils.getAnnotation(XmlAttribute.class, annotations); } XmlElement elem = member.getAnnotation(XmlElement.class); if (elem == null) { elem = AnnotationsUtils.getAnnotation(XmlElement.class, annotations); } if (wrapper != null) { applyElement(wrapper, property); } else if (elem != null) { applyElement(elem, property); } else if (attr != null && isAttributeAllowed(property)) { applyAttribute(attr, property); } }
for (int i = 0; i < genericParameterTypes.length; i++) { final Type type = TypeFactory.defaultInstance().constructType(genericParameterTypes[i], cls); io.swagger.v3.oas.annotations.Parameter paramAnnotation = AnnotationsUtils.getAnnotation(io.swagger.v3.oas.annotations.Parameter.class, paramAnnotations[i]); Type paramType = ParameterProcessor.getParameterType(paramAnnotation, true); if (paramType == null) { AnnotatedParameter param = annotatedMethod.getParameter(i); final Type type = TypeFactory.defaultInstance().constructType(param.getParameterType(), cls); io.swagger.v3.oas.annotations.Parameter paramAnnotation = AnnotationsUtils.getAnnotation(io.swagger.v3.oas.annotations.Parameter.class, paramAnnotations[i]); Type paramType = ParameterProcessor.getParameterType(paramAnnotation, true); if (paramType == null) {
.getAnnotation(io.swagger.v3.oas.annotations.Parameter.class, paramAnnotations[i]); .getAnnotation(io.swagger.v3.oas.annotations.Parameter.class, paramAnnotations[i]); Type paramType = ParameterProcessor.getParameterType(paramAnnotation, true);
JsonIdentityInfo jsonIdentityInfo = AnnotationsUtils.getAnnotation(JsonIdentityInfo.class, annotatedType.getCtxAnnotations()); if (jsonIdentityInfo == null) { jsonIdentityInfo = type.getRawClass().getAnnotation(JsonIdentityInfo.class); JsonIdentityReference jsonIdentityReference = AnnotationsUtils.getAnnotation(JsonIdentityReference.class, annotatedType.getCtxAnnotations()); if (jsonIdentityReference == null) { jsonIdentityReference = type.getRawClass().getAnnotation(JsonIdentityReference.class);