// Generated by delombok at Sun Feb 26 12:31:38 KST 2017 package scouter.bytebuddy.matcher; import scouter.bytebuddy.description.type.TypeDescription; /** * An element matcher that matches its argument for being another type's super type. * * @param <T> The type of the matched entity. */ public class SuperTypeMatcher<T extends TypeDescription> extends ElementMatcher.Junction.AbstractBase<T> { /** * The type to be matched being a sub type of the matched type. */ private final TypeDescription typeDescription; /** * Creates a new matcher for matching its input for being a super type of the given {@code typeDescription}. * * @param typeDescription The type to be matched being a sub type of the matched type. */ public SuperTypeMatcher(TypeDescription typeDescription) { this.typeDescription = typeDescription; } @Override public boolean matches(T target) { return target.isAssignableFrom(typeDescription); } @Override public String toString() { return "isSuperTypeOf(" + typeDescription + ')'; } @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 SuperTypeMatcher)) return false; final SuperTypeMatcher<?> other = (SuperTypeMatcher<?>) o; if (!other.canEqual((java.lang.Object) this)) return false; final java.lang.Object this$typeDescription = this.typeDescription; final java.lang.Object other$typeDescription = other.typeDescription; if (this$typeDescription == null ? other$typeDescription != null : !this$typeDescription.equals(other$typeDescription)) return false; return true; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") protected boolean canEqual(final java.lang.Object other) { return other instanceof SuperTypeMatcher; } @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 $typeDescription = this.typeDescription; result = result * PRIME + ($typeDescription == null ? 43 : $typeDescription.hashCode()); return result; } }