diff options
Diffstat (limited to 'compiler/src/main/java/android/databinding/tool/reflection/annotation/AnnotationClass.java')
-rw-r--r-- | compiler/src/main/java/android/databinding/tool/reflection/annotation/AnnotationClass.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/compiler/src/main/java/android/databinding/tool/reflection/annotation/AnnotationClass.java b/compiler/src/main/java/android/databinding/tool/reflection/annotation/AnnotationClass.java index ce17c4b0..feae09db 100644 --- a/compiler/src/main/java/android/databinding/tool/reflection/annotation/AnnotationClass.java +++ b/compiler/src/main/java/android/databinding/tool/reflection/annotation/AnnotationClass.java @@ -286,13 +286,17 @@ class AnnotationClass extends ModelClass { @Override public boolean isAssignableFrom(ModelClass that) { - if (that == null) { + ModelClass other = that; + while (other != null && !(other instanceof AnnotationClass)) { + other = other.getSuperclass(); + } + if (other == null) { return false; } - if (equals(that)) { + if (equals(other)) { return true; } - AnnotationClass thatAnnotationClass = (AnnotationClass) that; + AnnotationClass thatAnnotationClass = (AnnotationClass) other; return getTypeUtils().isAssignable(thatAnnotationClass.mTypeMirror, this.mTypeMirror); } |