// Generated by delombok at Sun Feb 26 12:31:38 KST 2017 package scouter.bytebuddy.matcher; import scouter.bytebuddy.description.annotation.AnnotationSource; import scouter.bytebuddy.description.annotation.AnnotationList; /** * An element matcher that matches the list of annotations that are provided by an annotated element. * * @param <T> The actual matched type of this matcher. */ public class DeclaringAnnotationMatcher<T extends AnnotationSource> extends ElementMatcher.Junction.AbstractBase<T> { /** * The matcher to be applied to the provided annotation list. */ private final ElementMatcher<? super AnnotationList> matcher; /** * Creates a new matcher for the annotations of an annotated element. * * @param matcher The matcher to be applied to the provided annotation list. */ public DeclaringAnnotationMatcher(ElementMatcher<? super AnnotationList> matcher) { this.matcher = matcher; } @Override public boolean matches(T target) { return matcher.matches(target.getDeclaredAnnotations()); } @Override public String toString() { return "declaresAnnotations(" + matcher + ")"; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof DeclaringAnnotationMatcher)) return false; final DeclaringAnnotationMatcher<?> other = (DeclaringAnnotationMatcher<?>) o; if (!other.canEqual((java.lang.Object) this)) return false; final java.lang.Object this$matcher = this.matcher; final java.lang.Object other$matcher = other.matcher; if (this$matcher == null ? other$matcher != null : !this$matcher.equals(other$matcher)) return false; return true; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") protected boolean canEqual(final java.lang.Object other) { return other instanceof DeclaringAnnotationMatcher; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") public int hashCode() { final int PRIME = 59; int result = 1; final java.lang.Object $matcher = this.matcher; result = result * PRIME + ($matcher == null ? 43 : $matcher.hashCode()); return result; } }