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

com.sun.tools.ws.processor.modeler.annotation.MemberInfo Maven / Gradle / Ivy

Go to download

Open source Reference Implementation of JSR-224: Java API for XML Web Services

The newest version!
/*
 * Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Distribution License v. 1.0, which is available at
 * http://www.eclipse.org/org/documents/edl-v10.php.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

package com.sun.tools.ws.processor.modeler.annotation;

import javax.lang.model.type.TypeMirror;

import java.lang.annotation.Annotation;
import java.util.List;

/**
 * Note: this class has a natural ordering that is inconsistent with equals.
 * @author  WS Development Team
 */
public final class MemberInfo implements Comparable {
    private final TypeMirror paramType;
    private final String paramName;
    private final List jaxbAnnotations;

    MemberInfo(TypeMirror paramType, String paramName, List jaxbAnnotations) {
        this.paramType = paramType;
        this.paramName = paramName;
        this.jaxbAnnotations = jaxbAnnotations;
    }

    public List getJaxbAnnotations() {
        return jaxbAnnotations;
    }

    public TypeMirror getParamType() {
        return paramType;
    }

    public String getParamName() {
        return paramName;
    }

    @Override
    public int compareTo(MemberInfo member) {
        return paramName.compareTo(member.paramName);
    }

    @Override
    public boolean equals(Object o) {
        return super.equals(o);
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 47 * hash + (this.paramType != null ? this.paramType.hashCode() : 0);
        hash = 47 * hash + (this.paramName != null ? this.paramName.hashCode() : 0);
        hash = 47 * hash + (this.jaxbAnnotations != null ? this.jaxbAnnotations.hashCode() : 0);
        return hash;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy