use in_hierarchy when checking the given class is related (extends or implements) Android components