Mark StrubergI think there's a misunderstanding. Your point regarding type closure is true in standard metadata discovery and creation (i.e. done thru class scanning). The best proof is that If you read section 2 carefully, you'll see that its mentions "bean class" from time to time. These rules don't apply when it comes to synthetic metadata. You can create a custom bean with a totally "inconsistent" types set from section 2 perspective. This is often done when you want to provide powerful features like type conversion. Other rules described in chapter 2 can be broken when defining synthetic metadata. For instance you can create custom bean without @Any in its qualifiers set while chapter 2 says that all beans have it. So why should we forbid in synthetic AnnotatedType what we allow in synthetic beans? |