1
0
mirror of https://github.com/google/nomulus synced 2026-04-24 10:10:46 +00:00

Add golden files for request component routing maps

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157026188
This commit is contained in:
mountford
2017-05-24 13:06:16 -07:00
committed by Ben McIlwain
parent bb67841884
commit ddb0f5692e
23 changed files with 514 additions and 39 deletions

View File

@@ -25,12 +25,14 @@ import com.google.common.base.Function;
@AutoValue
abstract class Route {
static Route create(Action action, Function<Object, Runnable> instantiator) {
return new AutoValue_Route(action, instantiator);
static Route create(
Action action, Function<Object, Runnable> instantiator, Class<?> actionClass) {
return new AutoValue_Route(action, instantiator, actionClass);
}
abstract Action action();
abstract Function<Object, Runnable> instantiator();
abstract Class<?> actionClass();
boolean isMethodAllowed(Action.Method requestMethod) {
for (Action.Method method : action().method()) {