If @Vetoed (available with CDI 1.1) will work for you, you can use @Typed () with no values or with Apache DeltaSpike @Exclude. If you cannot (/ dislike) changing the class, you can create a CDI extension and an observer ProcessAnnotatedType -> call #veto if, for example, processAnnotatedType.getAnnotatedType (). getJavaClass () returns the class you would like to exclude.
source share