The method `Gson.excluder()` exposes the internal `Excluder` class, see also Javadoc:  The method should be package-private, or be removed completely. (Method was added by #838) It looks like #1492 tried to fix this, but no follow-up pull request for that was created.