use of io.swagger.models.parameters.Parameter in project java-chassis by ServiceComb.
the class ArgumentsMapperFactory method collectContextArgumentsMapper.
protected void collectContextArgumentsMapper(ArgumentsMapperConfig config) {
for (int providerIdx = 0; providerIdx < config.getProviderParameters().size(); providerIdx++) {
Parameter providerParameter = config.getProviderParameters().get(providerIdx);
if (!ContextParameter.class.isInstance(providerParameter)) {
continue;
}
ContextArgumentMapperFactory factory = findFactory(providerParameter.getClass());
if (factory != null) {
ArgumentMapper mapper = factory.create(providerIdx);
config.addArgumentMapper(mapper);
continue;
}
throw new Error("unknown context parameter " + providerParameter.getClass().getName());
}
}
Aggregations