test_class.declarator: consumer
test_class.modifier: private
test_class.original_string: private AsListConsumer consumer;
test_class.type: AsListConsumer
test_class.var_name: consumer
test_class.file: meta/src/test/java/org/jboss/hal/meta/description/SegmentProcessorTest.java
test_class.identifier: SegmentProcessorTest
test_case.body: @Test
      public void server2() throws Exception {
          Fixture fixture = new Fixture.Builder("server2")
                  .segments("host", "*", "server", "server-one", "subsystem", "datasources", "data-source", "*")
                  .expected("host", "*", "server", "*", "subsystem", "datasources", "data-source", "*")
                  .build();
          SegmentProcessor.process(fixture.segments, consumer);
          assertFixture(fixture, consumer.result);
      }
test_case.class_method_signature: SegmentProcessorTest.server2()
test_case.full_signature: @Test public void server2()
test_case.identifier: server2
test_case.invocations: build expected segments process assertFixture
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void server2()
focal_class.file: meta/src/main/java/org/jboss/hal/meta/description/SegmentProcessor.java
focal_class.identifier: SegmentProcessor
focal_class.class_method_signature: SegmentProcessor.process(List<String[]> segments, Consumer<String[]> consumer)
focal_class.full_signature: static void process(List<String[]> segments, Consumer<String[]> consumer)
focal_class.identifier: process
focal_class.modifiers: static
focal_class.parameters: (List<String[]> segments, Consumer<String[]> consumer)
focal_class.return: void
focal_class.signature: void process(List<String[]> segments, Consumer<String[]> consumer)
focal_class.class_method_signature: SegmentProcessor.SegmentProcessor()
focal_class.full_signature: private  SegmentProcessor()
focal_class.identifier: SegmentProcessor
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  SegmentProcessor()
focal_method.body: static void process(List<String[]> segments, Consumer<String[]> consumer) {
          if (segments != null) {
              int index = 0;
              int length = segments.size();
              for (String[] segment : segments) {
                  String key = segment[0];
                  String value = segment[1];
                  if (key != null && value != null) {
                      switch (key) {
                          case HOST:
                              if (length > 1 && index == 0) {
                                  value = "*";
                              }
                              break;
  
                          case PROFILE:
                          case SERVER_GROUP:
                              if (index == 0) {
                                  value = "*";
                              }
                              break;
  
                          case SERVER:
                          case SERVER_CONFIG:
                              if (index == 1) {
                                  value = "*";
                              }
                              break;
                          default:
                              break;
                      }
                  }
                  consumer.accept(new String[]{key, value});
                  index++;
              }
          }
      }
focal_method.class_method_signature: SegmentProcessor.process(List<String[]> segments, Consumer<String[]> consumer)
focal_method.full_signature: static void process(List<String[]> segments, Consumer<String[]> consumer)
focal_method.identifier: process
focal_method.invocations: size accept
focal_method.modifiers: static
focal_method.parameters: (List<String[]> segments, Consumer<String[]> consumer)
focal_method.return: void
focal_method.signature: void process(List<String[]> segments, Consumer<String[]> consumer)