Package com.blackrook.small.annotation
Annotation Interface ComponentConstructor
This annotation specifies that the annotated constructor contains parameters
that should be filled with singleton instances. At this stage, components are created
as they are instantiated, so you can't fill components using non-instantiable class types.
All Controller
s/Filter
s/Component
-annotated classes that
have one of their constructors annotated with this will have that constructor
invoked on instantiation and its parameters set to other corresponding Component
objects of the same class.
One of the parameters of the constructor can be ServletContext
, which passes
in the application's Servlet Context. Another can be SmallConfiguration
, which passes
in the configuration for bootstrapping/configuring the application.
NOTE: All other kinds of interface-based searching for components will fail, here.
You can safely add those kinds of components via a method annotated with AfterInitialize
.
- Author:
- Matthew Tropiano
- See Also: