Class payloadType = Introspector.resolveToClass(contextualParameter.getGenericType(), Event.class, 0);
if (payloadType.isInstance(req.getEvent().getValue())) {
if (args.isEmpty()) {
args = new HashMap<ContextualParameter, Object>();
}
args.put(parameter, new Event(req.getEvent().getName(), req.getEvent().getValue()));
}
}
}
return args;
}