
ninja.RouteBuilderImpl Maven / Gradle / Ivy
/**
* Copyright (C) the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ninja;
import com.google.common.collect.Lists;
import com.google.inject.Inject;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.Set;
import ninja.params.ControllerMethodInvoker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.inject.Injector;
import com.google.inject.Provider;
import com.google.inject.util.Providers;
import java.util.List;
import java.util.Optional;
import ninja.ControllerMethods.ControllerMethod;
import ninja.utils.LambdaRoute;
import ninja.utils.MethodReference;
import ninja.utils.NinjaBaseDirectoryResolver;
import ninja.utils.NinjaProperties;
import ninja.utils.SwissKnife;
import ninja.application.ApplicationFilters;
public class RouteBuilderImpl implements RouteBuilder {
private static final Logger log = LoggerFactory.getLogger(RouteBuilder.class);
protected final static String GLOBAL_FILTERS_DEFAULT_LOCATION = "conf.Filters";
private String httpMethod;
private String uri;
private Method functionalMethod; // lamda routes can have this + maybe impl and targets
private Optional implementationMethod; // method to use for parameter/annotation extraction
private Optional
© 2015 - 2025 Weber Informatics LLC | Privacy Policy