private Optional<Annotation> getNewParameterAnnotationForField(MethodParameter methodParameter, PageableDefault pageableDefault, SortDefault sortDefault) {
		String parameterName = methodParameter.getParameterName();
		Parameter parameterNew;
		try {
			Parameter parameter = methodParameter.getContainingClass().getDeclaredField(parameterName).getAnnotation(Parameter.class);
			parameterNew = new Parameter() {
				@Override
				public Class<? extends Annotation> annotationType() {
					return parameter.annotationType();
				}

				@Override
				public String name() {
					return getName(parameterName, parameter.name());
				}

				@Override
				public ParameterIn in() {
					return parameter.in();
				}

				@Override
				public String description() {
					return getDescription(parameterName, parameter.description());
				}

				@Override
				public boolean required() {
					return parameter.required();
				}

				@Override
				public boolean deprecated() {
					return parameter.deprecated();
				}

				@Override
				public boolean allowEmptyValue() {
					return parameter.allowEmptyValue();
				}

				@Override
				public ParameterStyle style() {
					return parameter.style();
				}

				@Override
				public Explode explode() {
					return parameter.explode();
				}

				@Override
				public boolean allowReserved() {
					return parameter.allowReserved();
				}

				@Override
				public Schema schema() {
					return new Schema() {
						private Schema parameterSchema = parameter.schema();

						@Override
						public SchemaResolution schemaResolution() {
							return parameterSchema.schemaResolution();
						}

						@Override
						public Class<? extends Annotation> annotationType() {
							return parameterSchema.annotationType();
						}

						@Override
						public Class<?> implementation() {
							return parameterSchema.implementation();
						}

						@Override
						public Class<?> not() {
							return parameterSchema.not();
						}

						@Override
						public Class<?>[] oneOf() {
							return parameterSchema.oneOf();
						}

						@Override
						public Class<?>[] anyOf() {
							return parameterSchema.anyOf();
						}

						@Override
						public Class<?>[] allOf() {
							return parameterSchema.allOf();
						}

						@Override
						public String name() {
							return parameterSchema.name();
						}

						@Override
						public String title() {
							return parameterSchema.title();
						}

						@Override
						public double multipleOf() {
							return parameterSchema.multipleOf();
						}

						@Override
						public String maximum() {
							return parameterSchema.maximum();
						}

						@Override
						public boolean exclusiveMaximum() {
							return parameterSchema.exclusiveMaximum();
						}

						@Override
						public String minimum() {
							return parameterSchema.minimum();
						}

						@Override
						public boolean exclusiveMinimum() {
							return parameterSchema.exclusiveMaximum();
						}

						@Override
						public int maxLength() {
							return parameterSchema.maxLength();
						}

						@Override
						public int minLength() {
							return parameterSchema.minLength();
						}

						@Override
						public String pattern() {
							return parameterSchema.pattern();
						}

						@Override
						public int maxProperties() {
							return parameterSchema.maxProperties();
						}

						@Override
						public int minProperties() {
							return parameterSchema.minProperties();
						}

						@Override
						public String[] requiredProperties() {
							return parameterSchema.requiredProperties();
						}

						@Override
						public boolean required() {
							return parameterSchema.required();
						}

						@Override
						public RequiredMode requiredMode() {
							return parameterSchema.requiredMode();
						}

						@Override
						public String description() {
							return parameterSchema.description();
						}

						@Override
						public String format() {
							return parameterSchema.format();
						}

						@Override
						public String ref() {
							return parameterSchema.ref();
						}

						@Override
						public boolean nullable() {
							return parameterSchema.nullable();
						}

						@Override
						public boolean readOnly() {
							return AccessMode.READ_ONLY.equals(parameterSchema.accessMode());
						}

						@Override
						public boolean writeOnly() {
							return AccessMode.WRITE_ONLY.equals(parameterSchema.accessMode());
						}

						@Override
						public AccessMode accessMode() {
							return parameterSchema.accessMode();
						}

						@Override
						public String example() {
							return parameterSchema.example();
						}

						@Override
						public ExternalDocumentation externalDocs() {
							return parameterSchema.externalDocs();
						}

						@Override
						public boolean deprecated() {
							return parameterSchema.deprecated();
						}

						@Override
						public String type() {
							return parameterSchema.type();
						}

						@Override
						public String[] allowableValues() {
							return parameterSchema.allowableValues();
						}

						@Override
						public String defaultValue() {
							return getDefaultValue(parameterName, pageableDefault, parameterSchema.defaultValue());
						}

						@Override
						public String discriminatorProperty() {
							return parameterSchema.discriminatorProperty();
						}

						@Override
						public DiscriminatorMapping[] discriminatorMapping() {
							return parameterSchema.discriminatorMapping();
						}

						@Override
						public boolean hidden() {
							return parameterSchema.hidden();
						}

						@Override
						public boolean enumAsRef() {
							return parameterSchema.enumAsRef();
						}

						@Override
						public Class<?>[] subTypes() {
							return parameterSchema.subTypes();
						}

						@Override
						public Extension[] extensions() {
							return parameterSchema.extensions();
						}

						@Override
						public Class<?>[] prefixItems() {
							return parameterSchema.prefixItems();
						}

						@Override
						public String[] types() {
							return parameterSchema.types();
						}

						@Override
						public int exclusiveMaximumValue() {
							return parameterSchema.exclusiveMaximumValue();
						}

						@Override
						public int exclusiveMinimumValue() {
							return parameterSchema.exclusiveMinimumValue();
						}

						@Override
						public Class<?> contains() {
							return parameterSchema.contains();
						}

						@Override
						public String $id() {
							return parameterSchema.$id();
						}

						@Override
						public String $schema() {
							return parameterSchema.$schema();
						}

						@Override
						public String $anchor() {
							return parameterSchema.$anchor();
						}

						@Override
						public String $vocabulary() {
							return parameterSchema.$vocabulary();
						}

						@Override
						public String $dynamicAnchor() {
							return parameterSchema.$dynamicAnchor();
						}

						@Override
						public String contentEncoding() {
							return parameterSchema.contentEncoding();
						}

						@Override
						public String contentMediaType() {
							return parameterSchema.contentMediaType();
						}

						@Override
						public Class<?> contentSchema() {
							return parameterSchema.contentSchema();
						}

						@Override
						public Class<?> propertyNames() {
							return parameterSchema.propertyNames();
						}

						@Override
						public int maxContains() {
							return parameterSchema.maxContains();
						}

						@Override
						public int minContains() {
							return parameterSchema.minContains();
						}

						@Override
						public Class<?> additionalItems() {
							return parameterSchema.additionalItems();
						}

						@Override
						public Class<?> unevaluatedItems() {
							return parameterSchema.unevaluatedItems();
						}

						@Override
						public Class<?> _if() {
							return parameterSchema._if();
						}

						@Override
						public Class<?> _else() {
							return parameterSchema._else();
						}

						@Override
						public Class<?> then() {
							return parameterSchema.then();
						}

						@Override
						public String $comment() {
							return parameterSchema.$comment();
						}

						@Override
						public Class<?>[] exampleClasses() {
							return parameterSchema.exampleClasses();
						}

						@Override
						public AdditionalPropertiesValue additionalProperties() {
							return parameterSchema.additionalProperties();
						}

						@Override
						public DependentRequired[] dependentRequiredMap() {
							return parameterSchema.dependentRequiredMap();
						}

						@Override
						public StringToClassMapItem[] dependentSchemas() {
							return parameterSchema.dependentSchemas();
						}

						@Override
						public StringToClassMapItem[] patternProperties() {
							return parameterSchema.patternProperties();
						}

						@Override
						public StringToClassMapItem[] properties() {
							return parameterSchema.properties();
						}

						@Override
						public Class<?> unevaluatedProperties() {
							return parameterSchema.unevaluatedProperties();
						}

						@Override
						public Class<?> additionalPropertiesSchema() {
							return parameterSchema.additionalPropertiesSchema();
						}

						@Override
						public String[] examples() {
							return parameterSchema.examples();
						}

						@Override
						public String _const() {
							return parameterSchema._const();
						}
					};
				}

				@Override
				public ArraySchema array() {
					ArraySchema arraySchema = parameter.array();
					return new ArraySchema() {
						@Override
						public Class<? extends Annotation> annotationType() {
							return arraySchema.annotationType();
						}

						@Override
						public Schema items() {
							return arraySchema.items();
						}

						@Override
						public Schema schema() {
							return arraySchema.schema();
						}

						@Override
						public Schema arraySchema() {
							Schema schema = arraySchema.arraySchema();
							return new Schema() {

								@Override
								public Class<? extends Annotation> annotationType() {
									return schema.annotationType();
								}

								@Override
								public Class<?> implementation() {
									return schema.implementation();
								}

								@Override
								public Class<?> not() {
									return schema.not();
								}

								@Override
								public Class<?>[] oneOf() {
									return schema.oneOf();
								}

								@Override
								public Class<?>[] anyOf() {
									return schema.anyOf();
								}

								@Override
								public Class<?>[] allOf() {
									return schema.allOf();
								}

								@Override
								public String name() {
									return schema.name();
								}

								@Override
								public String title() {
									return schema.title();
								}

								@Override
								public double multipleOf() {
									return schema.multipleOf();
								}

								@Override
								public String maximum() {
									return schema.maximum();
								}

								@Override
								public boolean exclusiveMaximum() {
									return schema.exclusiveMaximum();
								}

								@Override
								public String minimum() {
									return schema.minimum();
								}

								@Override
								public boolean exclusiveMinimum() {
									return schema.exclusiveMinimum();
								}

								@Override
								public int maxLength() {
									return schema.maxLength();
								}

								@Override
								public int minLength() {
									return schema.minLength();
								}

								@Override
								public String pattern() {
									return schema.pattern();
								}

								@Override
								public int maxProperties() {
									return schema.maxProperties();
								}

								@Override
								public int minProperties() {
									return schema.minProperties();
								}

								@Override
								public String[] requiredProperties() {
									return schema.requiredProperties();
								}

								@Override
								public boolean required() {
									return schema.required();
								}

								@Override
								public RequiredMode requiredMode() {
									return schema.requiredMode();
								}

								@Override
								public String description() {
									return schema.description();
								}

								@Override
								public String format() {
									return schema.format();
								}

								@Override
								public String ref() {
									return schema.ref();
								}

								@Override
								public boolean nullable() {
									return schema.nullable();
								}

								@Override
								public boolean readOnly() {
									return AccessMode.READ_ONLY.equals(schema.accessMode());
								}

								@Override
								public boolean writeOnly() {
									return AccessMode.WRITE_ONLY.equals(schema.accessMode());
								}

								@Override
								public AccessMode accessMode() {
									return schema.accessMode();
								}

								@Override
								public String example() {
									return schema.example();
								}

								@Override
								public ExternalDocumentation externalDocs() {
									return schema.externalDocs();
								}

								@Override
								public boolean deprecated() {
									return schema.deprecated();
								}

								@Override
								public String type() {
									return schema.type();
								}

								@Override
								public String[] allowableValues() {
									return schema.allowableValues();
								}

								@Override
								public String defaultValue() {
									return getArrayDefaultValue(parameterName, pageableDefault, sortDefault, schema.defaultValue());

								}

								@Override
								public String discriminatorProperty() {
									return schema.discriminatorProperty();
								}

								@Override
								public DiscriminatorMapping[] discriminatorMapping() {
									return schema.discriminatorMapping();
								}

								@Override
								public boolean hidden() {
									return schema.hidden();
								}

								@Override
								public boolean enumAsRef() {
									return schema.enumAsRef();
								}

								@Override
								public Class<?>[] subTypes() {
									return schema.subTypes();
								}

								@Override
								public Extension[] extensions() {
									return schema.extensions();
								}

								@Override
								public Class<?>[] prefixItems() {
									return schema.prefixItems();
								}

								@Override
								public String[] types() {
									return schema.types();
								}

								@Override
								public int exclusiveMaximumValue() {
									return schema.exclusiveMaximumValue();
								}

								@Override
								public int exclusiveMinimumValue() {
									return schema.exclusiveMinimumValue();
								}

								@Override
								public Class<?> contains() {
									return schema.contains();
								}

								@Override
								public String $id() {
									return schema.$id();
								}

								@Override
								public String $schema() {
									return schema.$schema();
								}

								@Override
								public String $anchor() {
									return schema.$anchor();
								}

								@Override
								public String $vocabulary() {
									return schema.$vocabulary();
								}

								@Override
								public String $dynamicAnchor() {
									return schema.$dynamicAnchor();
								}

								@Override
								public String contentEncoding() {
									return schema.contentEncoding();
								}

								@Override
								public String contentMediaType() {
									return schema.contentMediaType();
								}

								@Override
								public Class<?> contentSchema() {
									return schema.contentSchema();
								}

								@Override
								public Class<?> propertyNames() {
									return schema.propertyNames();
								}

								@Override
								public int maxContains() {
									return schema.maxContains();
								}

								@Override
								public int minContains() {
									return schema.minContains();
								}

								@Override
								public Class<?> additionalItems() {
									return schema.additionalItems();
								}

								@Override
								public Class<?> unevaluatedItems() {
									return schema.unevaluatedItems();
								}

								@Override
								public Class<?> _if() {
									return schema._if();
								}

								@Override
								public Class<?> _else() {
									return schema._else();
								}

								@Override
								public Class<?> then() {
									return schema.then();
								}

								@Override
								public String $comment() {
									return schema.$comment();
								}

								@Override
								public Class<?>[] exampleClasses() {
									return schema.exampleClasses();
								}

								@Override
								public AdditionalPropertiesValue additionalProperties() {
									return schema.additionalProperties();
								}

								@Override
								public DependentRequired[] dependentRequiredMap() {
									return schema.dependentRequiredMap();
								}

								@Override
								public StringToClassMapItem[] dependentSchemas() {
									return schema.dependentSchemas();
								}

								@Override
								public StringToClassMapItem[] patternProperties() {
									return schema.patternProperties();
								}

								@Override
								public StringToClassMapItem[] properties() {
									return schema.properties();
								}

								@Override
								public Class<?> unevaluatedProperties() {
									return schema.unevaluatedProperties();
								}

								@Override
								public Class<?> additionalPropertiesSchema() {
									return schema.additionalPropertiesSchema();
								}

								@Override
								public String[] examples() {
									return schema.examples();
								}

								@Override
								public String _const() {
									return schema._const();
								}

								@Override
								public SchemaResolution schemaResolution() {
									return schema.schemaResolution();
								}
							};
						}

						@Override
						public int maxItems() {
							return arraySchema.maxItems();
						}

						@Override
						public int minItems() {
							return arraySchema.minItems();
						}

						@Override
						public boolean uniqueItems() {
							return arraySchema.uniqueItems();
						}

						@Override
						public Extension[] extensions() {
							return arraySchema.extensions();
						}

						@Override
						public Schema contains() {
							return arraySchema.contains();
						}

						@Override
						public int maxContains() {
							return arraySchema.maxContains();
						}

						@Override
						public int minContains() {
							return arraySchema.minContains();
						}

						@Override
						public Schema unevaluatedItems() {
							return arraySchema.unevaluatedItems();
						}

						@Override
						public Schema[] prefixItems() {
							return arraySchema.prefixItems();
						}
					};
				}

				@Override
				public Content[] content() {
					return parameter.content();
				}

				@Override
				public boolean hidden() {
					return parameter.hidden();
				}

				@Override
				public ExampleObject[] examples() {
					return parameter.examples();
				}

				@Override
				public String example() {
					return parameter.example();
				}

				@Override
				public Extension[] extensions() {
					return parameter.extensions();
				}

				@Override
				public String ref() {
					return parameter.ref();
				}

				@Override
				public Class<?>[] validationGroups() {
					return new Class[0];
				}
			};
			return Optional.of(parameterNew);
		}
		catch (NoSuchFieldException e) {
			LOGGER.warn(e.getMessage());
			return Optional.empty();
		}
	}
Gets new parameter annotation for field.

@param methodParameter the method parameter
@param pageableDefault the pageable default
@param sortDefault     the sort default
@return the new parameter annotation for field
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/customizers/DataRestDelegatingMethodParameterCustomizer.java