class IntentArgumentResolver implements ArgumentResolver {

    @Override
    public Optional<Object> resolve(ArgumentResolverContext input) {
        if (input.requestTypeEquals(IntentRequest.class) && input.parameterTypeEquals(Intent.class)) {
            return Optional.of(((IntentRequest) input.unwrapRequest()).getIntent())          ;
        }
        return Optional.empty();
    }

}