此内容没有您所选择的语言版本。
7.2. Callbacks
The descriptor shown in Example 7.3, “Callbacks to Collect and Filter Beans” allows you to collect all beans of a certain type, and even limit the number of matching beans.
In conjunction with the descriptor in Example 7.3, “Callbacks to Collect and Filter Beans”, the Java code shown in Example 7.4, “A Parser to Collect all Editors” shows a
Parser
which collects all Editor
s.
Example 7.3. Callbacks to Collect and Filter Beans
Example 7.4. A Parser to Collect all Editors
Notice that
incallback
and uncallback
use the method name for matching.
A bottom limit controls how many editors actually cause the bean to progress from a Configured state:
cardinality=4..n/>
Eventually,
Checker
gets created and checks the parser. This is illustrated in Example 7.5, “The Checker for the Parser”.
Example 7.5. The Checker for the Parser