All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jboss.resteasy.reactive.server.model.ServerMethodParameter Maven / Gradle / Ivy

There is a newer version: 3.17.5
Show newest version
package org.jboss.resteasy.reactive.server.model;

import java.util.Objects;

import org.jboss.resteasy.reactive.common.model.MethodParameter;
import org.jboss.resteasy.reactive.common.model.ParameterType;
import org.jboss.resteasy.reactive.server.core.parameters.ParameterExtractor;
import org.jboss.resteasy.reactive.server.core.parameters.converters.ParameterConverterSupplier;

public class ServerMethodParameter extends MethodParameter {

    public ParameterConverterSupplier converter;
    public ParameterExtractor customParameterExtractor;

    public ServerMethodParameter() {
    }

    public ServerMethodParameter(String name, String type, String declaredType, String declaredUnresolvedType,
            ParameterType parameterType, boolean single,
            String signature,
            ParameterConverterSupplier converter, String defaultValue, boolean obtainedAsCollection, boolean optional,
            boolean encoded,
            ParameterExtractor customParameterExtractor,
            String mimeType, String separator) {
        super(name, type, declaredType, declaredUnresolvedType, signature, parameterType, single, defaultValue,
                obtainedAsCollection, optional,
                encoded, mimeType, null /* not useful for server params */, separator);
        this.converter = converter;
        this.customParameterExtractor = customParameterExtractor;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;
        ServerMethodParameter that = (ServerMethodParameter) o;
        if (!super.equals(that)) {
            return false;
        }
        return Objects.equals(converter, that.converter)
                && Objects.equals(customParameterExtractor, that.customParameterExtractor);
    }

    @Override
    public int hashCode() {
        return Objects.hash(converter, customParameterExtractor) + super.hashCode();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy