As far as I know you can only filter at the package level. However Javadoc is only generated for public and protected types. If the types are default-scoped or private they won't have javadoc generated for them. Making them default-scoped means they are still visible to other types in the package.If you don't want javadoc, you probably don't want people to use those types, so this is probably a good scope to go for anyway.
The excludePackageNames configuration allows wildcards. So as long as you have a package name convention that allows this you can exclude the majority of packages.
Say you have these packages.
com.foo
com.foo.api
com.foo.internal
com.foo.internal.core
com.foo.internal.util
com.foo.internal.ui
com.foo.ui
and you only want to expose foo, foo.api and foo.ui, this pattern will work:
<excludePackageNames>com.foo.internal.*:com.foo.bob</excludePackageNames>
You could alternatively move the offending types into separate packages, but this is not a good reason to do so.
What is the issue with generating javadoc for these types?