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

com.github.datalking.context.annotation.AnnoClassTuple2 Maven / Gradle / Ivy

The newest version!
package com.github.datalking.context.annotation;

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

/**
 * @author yaoo on 4/17/18
 */
public class AnnoClassTuple2 {

    private Annotation annotation;

    private Class clazz;

    public AnnoClassTuple2() {
    }

    public AnnoClassTuple2(Annotation annotation, Class clazz) {
        this.annotation = annotation;
        this.clazz = clazz;
    }

    public Class getClazz() {
        return clazz;
    }

    public void setClazz(Class clazz) {
        this.clazz = clazz;
    }

    public Annotation getAnnotation() {
        return annotation;
    }

    public void setAnnotation(Annotation annotation) {
        this.annotation = annotation;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        AnnoClassTuple2 that = (AnnoClassTuple2) o;

        if (!annotation.equals(that.annotation)) return false;
        return clazz.getName().equals(that.clazz.getName());
    }

    @Override
    public int hashCode() {
        int result = annotation.hashCode();
        result = 31 * result + clazz.hashCode();
        return result;
    }

    @Override
    public String toString() {
        return "AnnoClassTuple2{" +
                "annotation=" + annotation +
                ", clazz=" + clazz +
                '}';
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy