Skip to content

Commit

Permalink
Merge pull request #1588 from CzwAthou/master
Browse files Browse the repository at this point in the history
支持baseviewholder带泛型参数
  • Loading branch information
CymChad authored Sep 28, 2017
2 parents 121cc47 + 7dea83c commit 49e85b3
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,11 @@ private Class getInstancedGenericKClass(Class z) {
if (BaseViewHolder.class.isAssignableFrom(tempClass)) {
return tempClass;
}
} else if (temp instanceof ParameterizedType) {
Type rawType = ((ParameterizedType) temp).getRawType();
if (rawType instanceof Class && BaseViewHolder.class.isAssignableFrom((Class<?>) rawType)) {
return (Class<?>) rawType;
}
}
}
}
Expand Down

0 comments on commit 49e85b3

Please sign in to comment.