Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdi-dev] It is not an inner class

Just for curiosity, I'd like to understand in more detail the following statement [1] in the specs.

> * It is not an inner class.


I don't want to jump to conclusions but it seems to be easiest to express my question by just asking right away:

Would it be possible to just drop that statement "It is not an inner class."
and maybe replace the constructor requirement below with something like

* It has exactly one constructor or has exactly one constructor annotated @Inject


Inner classes have constructors just like any other the first parameters of which
are the instance of the enclosing class and can be annotated just like any other constructor.
Furthermore, ProcessAnnotatedType could add an @Inject annotation to a constructor.

Particularly when dealing with existing or 3rd-party code, inner classes may be given.
Not being able to turn them into beans looks to me like a restriction
I don't at the moment see a conclusive reason for.
Is it really necessary?





Back to the top