public RestPathParser(RestAPI restAPI) {
this.restAPI = restAPI;
}
public static Path parse(Map path, final RestAPI restApi) {
TypeInformation typeInfo = new TypeInformation(path.get("nodes"));
RestPathParser restPathParser = new RestPathParser(restApi);
if (restPathParser.isFullPath(typeInfo)){
return restPathParser.parseFullPath(path, restApi);
}
if (restPathParser.isPath(typeInfo)){
return restPathParser.parsePath(path, restApi);
}
throw new IllegalArgumentException("params map contained illegal type "+typeInfo.getGenericArguments()[0]);
}