// 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 subtype. * * @param <T> The type of the matched entity. */ public class SubTypeMatcher<T extends TypeDescription> extends ElementMatcher.Junction.AbstractBase<T> { /** * The type to be matched being a super type of the matched type. */ private final TypeDescription typeDescription; /** * Creates a new matcher for matching its input for being a sub type of the given {@code typeDescription}. * * @param typeDescription The type to be matched being a super type of the matched type. */ public SubTypeMatcher(TypeDescription typeDescription) { this.typeDescription = typeDescription; } @Override public boolean matches(T target) { return target.isAssignableTo(typeDescription); } @Override public String toString() { return "isSubTypeOf(" + 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 SubTypeMatcher)) return false; final SubTypeMatcher<?> other = (SubTypeMatcher<?>) 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 SubTypeMatcher; } @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; } }