test_class.file: spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/filter/factory/PrefixPathGatewayFilterFactoryTest.java
test_class.identifier: PrefixPathGatewayFilterFactoryTest
test_case.body: @Test
  	public void toStringFormat() {
  		Config config = new Config();
  		config.setPrefix("myprefix");
  		GatewayFilter filter = new PrefixPathGatewayFilterFactory().apply(config);
  		assertThat(filter.toString()).contains("myprefix");
  	}
test_case.class_method_signature: PrefixPathGatewayFilterFactoryTest.toStringFormat()
test_case.full_signature: @Test public void toStringFormat()
test_case.identifier: toStringFormat
test_case.invocations: setPrefix apply contains assertThat toString
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void toStringFormat()
focal_class.declarator: PREFIX_KEY = "prefix"
focal_class.modifier: public static final
focal_class.original_string: public static final String PREFIX_KEY = "prefix";
focal_class.type: String
focal_class.var_name: PREFIX_KEY
focal_class.declarator: log = LogFactory.getLog(PrefixPathGatewayFilterFactory.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Log log = LogFactory.getLog(PrefixPathGatewayFilterFactory.class);
focal_class.type: Log
focal_class.var_name: log
focal_class.file: spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/filter/factory/PrefixPathGatewayFilterFactory.java
focal_class.identifier: PrefixPathGatewayFilterFactory
focal_class.class_method_signature: PrefixPathGatewayFilterFactory.PrefixPathGatewayFilterFactory()
focal_class.full_signature: public  PrefixPathGatewayFilterFactory()
focal_class.identifier: PrefixPathGatewayFilterFactory
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  PrefixPathGatewayFilterFactory()
focal_class.class_method_signature: PrefixPathGatewayFilterFactory.shortcutFieldOrder()
focal_class.full_signature: @Override public List<String> shortcutFieldOrder()
focal_class.identifier: shortcutFieldOrder
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<String>
focal_class.signature: List<String> shortcutFieldOrder()
focal_class.class_method_signature: PrefixPathGatewayFilterFactory.apply(Config config)
focal_class.full_signature: @Override public GatewayFilter apply(Config config)
focal_class.identifier: apply
focal_class.modifiers: @Override public
focal_class.parameters: (Config config)
focal_class.return: GatewayFilter
focal_class.signature: GatewayFilter apply(Config config)
focal_class.superclass: extends AbstractGatewayFilterFactory<PrefixPathGatewayFilterFactory.Config>
focal_method.body: @Override
  	public GatewayFilter apply(Config config) {
  		return new GatewayFilter() {
  			@Override
  			public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
  				boolean alreadyPrefixed = exchange.getAttributeOrDefault(GATEWAY_ALREADY_PREFIXED_ATTR, false);
  				if (alreadyPrefixed) {
  					return chain.filter(exchange);
  				}
  				exchange.getAttributes().put(GATEWAY_ALREADY_PREFIXED_ATTR, true);
  
  				ServerHttpRequest req = exchange.getRequest();
  				addOriginalRequestUrl(exchange, req.getURI());
  				String newPath = config.prefix + req.getURI().getRawPath();
  
  				ServerHttpRequest request = req.mutate().path(newPath).build();
  
  				exchange.getAttributes().put(GATEWAY_REQUEST_URL_ATTR, request.getURI());
  
  				if (log.isTraceEnabled()) {
  					log.trace("Prefixed URI with: " + config.prefix + " -> " + request.getURI());
  				}
  
  				return chain.filter(exchange.mutate().request(request).build());
  			}
  
  			@Override
  			public String toString() {
  				return filterToStringCreator(PrefixPathGatewayFilterFactory.this).append("prefix", config.getPrefix())
  						.toString();
  			}
  		};
  	}
focal_method.class_method_signature: PrefixPathGatewayFilterFactory.apply(Config config)
focal_method.full_signature: @Override public GatewayFilter apply(Config config)
focal_method.identifier: apply
focal_method.invocations: getAttributeOrDefault filter put getAttributes getRequest addOriginalRequestUrl getURI getRawPath getURI build path mutate put getAttributes getURI isTraceEnabled trace getURI filter build request mutate toString append filterToStringCreator getPrefix
focal_method.modifiers: @Override public
focal_method.parameters: (Config config)
focal_method.return: GatewayFilter
focal_method.signature: GatewayFilter apply(Config config)