* @param targetType The targetType to inspect methods on
* @param parameterResolverFactory The strategy for resolving parameter values
*/
@SuppressWarnings({"unchecked"})
protected AggregateCommandHandlerInspector(Class<T> targetType, ParameterResolverFactory parameterResolverFactory) {
MethodMessageHandlerInspector inspector = MethodMessageHandlerInspector.getInstance(targetType,
CommandHandler.class,
parameterResolverFactory,
true);
handlers = new ArrayList<AbstractMessageHandler>(inspector.getHandlers());
processNestedEntityCommandHandlers(targetType, parameterResolverFactory, new RootEntityAccessor(targetType));
for (Constructor constructor : targetType.getConstructors()) {
if (constructor.isAnnotationPresent(CommandHandler.class)) {
constructorCommandHandlers.add(
ConstructorCommandMessageHandler.forConstructor(constructor, parameterResolverFactory));