use of org.springframework.boot.actuate.endpoint.annotation.Selector in project spring-boot by spring-projects.
the class RequestPredicateFactory method getAllRemainingPathSegmentsParameter.
private Parameter getAllRemainingPathSegmentsParameter(Parameter[] selectorParameters) {
Parameter trailingPathsParameter = null;
for (Parameter selectorParameter : selectorParameters) {
Selector selector = selectorParameter.getAnnotation(Selector.class);
if (selector.match() == Match.ALL_REMAINING) {
Assert.state(trailingPathsParameter == null, "@Selector annotation with Match.ALL_REMAINING must be unique");
trailingPathsParameter = selectorParameter;
}
}
if (trailingPathsParameter != null) {
Assert.state(trailingPathsParameter == selectorParameters[selectorParameters.length - 1], "@Selector annotation with Match.ALL_REMAINING must be the last parameter");
}
return trailingPathsParameter;
}
Aggregations