public FunctionConfiguratorOneToMany<P, String> resultAsListOfString() { LOGGER.debug( "Configuring incoming request result: " + "method: " + method + ", " + "result list items class: " + String.class); return new FunctionConfiguratorOneToMany<>(requestHandlerManager, method, pClass, String.class); }
/** * Define a function to be applied * * @param biFunction function */ public void withFunction(Function<P, List<R>> biFunction) { withBiFunction((s, p) -> biFunction.apply(p)); } }
@PostConstruct public void configureMethods() { requestHandler .newConfiguration() .methodName("workspace/symbol") .paramsAsDto(ExtendedWorkspaceSymbolParams.class) .resultAsListOfDto(SymbolInformationDto.class) .withFunction(this::symbol); requestHandler .newConfiguration() .methodName("workspace/editFile") .paramsAsDto(FileEditParams.class) .resultAsListOfDto(TextEditDto.class) .withFunction(this::editFile); }
private <P, R> void dtoToDtoList( String name, Class<P> pClass, Class<R> rClass, Function<P, List<R>> function) { requestHandler .newConfiguration() .methodName("textDocument/" + name) .paramsAsDto(pClass) .resultAsListOfDto(rClass) .withFunction(function); }
public FunctionConfiguratorOneToMany<P, Double> resultAsListOfDouble() { LOGGER.debug( "Configuring incoming request result: " + "method: " + method + ", " + "result list items class: " + Double.class); return new FunctionConfiguratorOneToMany<>(requestHandlerManager, method, pClass, Double.class); }
.paramsAsDto(SnippetParameters.class) .resultAsListOfDto(SnippetResult.class) .withFunction(this::getSnippets);
public FunctionConfiguratorOneToMany<P, Boolean> resultAsListOfBoolean() { LOGGER.debug( "Configuring incoming request result: " + "method: " + method + ", " + "result list items class: " + Boolean.class); return new FunctionConfiguratorOneToMany<>( requestHandlerManager, method, pClass, Boolean.class); }
public <R> FunctionConfiguratorOneToMany<P, R> resultAsListOfDto(Class<R> rClass) { checkNotNull(rClass, "Result class must not be null"); LOGGER.debug( "Configuring incoming request result: " + "method: " + method + ", " + "result list items class: " + rClass); return new FunctionConfiguratorOneToMany<>(requestHandlerManager, method, pClass, rClass); }