
name.remal.annotation.MetaAnnotationScanContext Maven / Gradle / Ivy
package name.remal.annotation;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.lang.reflect.AnnotatedElement;
import java.util.List;
import java.util.Objects;
final class MetaAnnotationScanContext {
@Nonnull
private final AnnotatedElement annotatedElement;
@Nullable
private final List attributes;
public MetaAnnotationScanContext(@Nonnull AnnotatedElement annotatedElement, @Nullable List attributes) {
this.annotatedElement = annotatedElement;
this.attributes = attributes;
}
@Nonnull
public AnnotatedElement getAnnotatedElement() {
return annotatedElement;
}
@Nullable
public List getAttributes() {
return attributes;
}
@Override
public boolean equals(@Nullable Object obj) {
if (this == obj) return true;
if (!(obj instanceof MetaAnnotationScanContext)) return false;
MetaAnnotationScanContext other = (MetaAnnotationScanContext) obj;
return Objects.equals(annotatedElement, other.annotatedElement) && Objects.equals(attributes, other.attributes);
}
@Override
public int hashCode() {
return Objects.hash(annotatedElement, attributes);
}
@Override
public String toString() {
return MetaAnnotationScanContext.class.getSimpleName() + "{"
+ "annotatedElement=" + annotatedElement
+ ", attributes=" + attributes
+ '}';
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy