test_class.declarator: KNOWN_NAMESPACE = "org.eclipse.ditto.test"
test_class.modifier: private static final
test_class.original_string: private static final String KNOWN_NAMESPACE = "org.eclipse.ditto.test";
test_class.type: String
test_class.var_name: KNOWN_NAMESPACE
test_class.declarator: KNOWN_ID = "myThing"
test_class.modifier: private static final
test_class.original_string: private static final String KNOWN_ID = "myThing";
test_class.type: String
test_class.var_name: KNOWN_ID
test_class.declarator: KNOWN_CHANNEL = TopicPath.Channel.TWIN
test_class.modifier: private static final
test_class.original_string: private static final TopicPath.Channel KNOWN_CHANNEL = TopicPath.Channel.TWIN;
test_class.type: TopicPath.Channel
test_class.var_name: KNOWN_CHANNEL
test_class.declarator: KNOWN_GROUP = TopicPath.Group.THINGS
test_class.modifier: private static final
test_class.original_string: private static final TopicPath.Group KNOWN_GROUP = TopicPath.Group.THINGS;
test_class.type: TopicPath.Group
test_class.var_name: KNOWN_GROUP
test_class.declarator: KNOWN_CRITERION = TopicPath.Criterion.COMMANDS
test_class.modifier: private static final
test_class.original_string: private static final TopicPath.Criterion KNOWN_CRITERION = TopicPath.Criterion.COMMANDS;
test_class.type: TopicPath.Criterion
test_class.var_name: KNOWN_CRITERION
test_class.declarator: KNOWN_ACTION = TopicPath.Action.MODIFY
test_class.modifier: private static final
test_class.original_string: private static final TopicPath.Action KNOWN_ACTION = TopicPath.Action.MODIFY;
test_class.type: TopicPath.Action
test_class.var_name: KNOWN_ACTION
test_class.declarator: KNOWN_SUBJECT = "mySubject"
test_class.modifier: private static final
test_class.original_string: private static final String KNOWN_SUBJECT = "mySubject";
test_class.type: String
test_class.var_name: KNOWN_SUBJECT
test_class.declarator: KNOWN_SUBJECT2 = "$set.configuration/steps"
test_class.modifier: private static final
test_class.original_string: private static final String KNOWN_SUBJECT2 = "$set.configuration/steps";
test_class.type: String
test_class.var_name: KNOWN_SUBJECT2
test_class.declarator: KNOWN_TOPIC_PATH = TopicPath.newBuilder(ThingId.of(KNOWN_NAMESPACE, KNOWN_ID))
          .twin().things().commands().modify().build()
test_class.modifier: private static final
test_class.original_string: private static final TopicPath KNOWN_TOPIC_PATH = TopicPath.newBuilder(ThingId.of(KNOWN_NAMESPACE, KNOWN_ID))
          .twin().things().commands().modify().build();
test_class.type: TopicPath
test_class.var_name: KNOWN_TOPIC_PATH
test_class.declarator: KNOWN_TOPIC_PATH_SUBJECT1 = TopicPath.newBuilder(ThingId.of(KNOWN_NAMESPACE, KNOWN_ID))
          .live().things().messages().subject(KNOWN_SUBJECT).build()
test_class.modifier: private static final
test_class.original_string: private static final TopicPath KNOWN_TOPIC_PATH_SUBJECT1 = TopicPath.newBuilder(ThingId.of(KNOWN_NAMESPACE, KNOWN_ID))
          .live().things().messages().subject(KNOWN_SUBJECT).build();
test_class.type: TopicPath
test_class.var_name: KNOWN_TOPIC_PATH_SUBJECT1
test_class.declarator: KNOWN_TOPIC_PATH_SUBJECT2 = TopicPath.newBuilder(ThingId.of(KNOWN_NAMESPACE, KNOWN_ID))
          .live().things().messages().subject(KNOWN_SUBJECT2).build()
test_class.modifier: private static final
test_class.original_string: private static final TopicPath KNOWN_TOPIC_PATH_SUBJECT2 = TopicPath.newBuilder(ThingId.of(KNOWN_NAMESPACE, KNOWN_ID))
          .live().things().messages().subject(KNOWN_SUBJECT2).build();
test_class.type: TopicPath
test_class.var_name: KNOWN_TOPIC_PATH_SUBJECT2
test_class.declarator: UNDER_TEST = ImmutableTopicPathPlaceholder.INSTANCE
test_class.modifier: private static final
test_class.original_string: private static final ImmutableTopicPathPlaceholder UNDER_TEST = ImmutableTopicPathPlaceholder.INSTANCE;
test_class.type: ImmutableTopicPathPlaceholder
test_class.var_name: UNDER_TEST
test_class.file: model/placeholders/src/test/java/org/eclipse/ditto/model/placeholders/ImmutableTopicPathPlaceholderTest.java
test_class.identifier: ImmutableTopicPathPlaceholderTest
test_case.body: @Test
      public void testReplaceWeirdSubject() {
          assertThat(UNDER_TEST.resolve(KNOWN_TOPIC_PATH_SUBJECT2, "subject")).contains(KNOWN_SUBJECT2);
      }
test_case.class_method_signature: ImmutableTopicPathPlaceholderTest.testReplaceWeirdSubject()
test_case.full_signature: @Test public void testReplaceWeirdSubject()
test_case.identifier: testReplaceWeirdSubject
test_case.invocations: contains assertThat resolve
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testReplaceWeirdSubject()
focal_class.declarator: INSTANCE = new ImmutableTopicPathPlaceholder()
focal_class.modifier: static final
focal_class.original_string: static final ImmutableTopicPathPlaceholder INSTANCE = new ImmutableTopicPathPlaceholder();
focal_class.type: ImmutableTopicPathPlaceholder
focal_class.var_name: INSTANCE
focal_class.declarator: FULL_PLACEHOLDER = "full"
focal_class.modifier: private static final
focal_class.original_string: private static final String FULL_PLACEHOLDER = "full";
focal_class.type: String
focal_class.var_name: FULL_PLACEHOLDER
focal_class.declarator: NAMESPACE_PLACEHOLDER = "namespace"
focal_class.modifier: private static final
focal_class.original_string: private static final String NAMESPACE_PLACEHOLDER = "namespace";
focal_class.type: String
focal_class.var_name: NAMESPACE_PLACEHOLDER
focal_class.declarator: ENTITYID_PLACEHOLDER = "entityId"
focal_class.modifier: private static final
focal_class.original_string: private static final String ENTITYID_PLACEHOLDER = "entityId";
focal_class.type: String
focal_class.var_name: ENTITYID_PLACEHOLDER
focal_class.declarator: GROUP_PLACEHOLDER = "group"
focal_class.modifier: private static final
focal_class.original_string: private static final String GROUP_PLACEHOLDER = "group";
focal_class.type: String
focal_class.var_name: GROUP_PLACEHOLDER
focal_class.declarator: CHANNEL_PLACEHOLDER = "channel"
focal_class.modifier: private static final
focal_class.original_string: private static final String CHANNEL_PLACEHOLDER = "channel";
focal_class.type: String
focal_class.var_name: CHANNEL_PLACEHOLDER
focal_class.declarator: CRITERION_PLACEHOLDER = "criterion"
focal_class.modifier: private static final
focal_class.original_string: private static final String CRITERION_PLACEHOLDER = "criterion";
focal_class.type: String
focal_class.var_name: CRITERION_PLACEHOLDER
focal_class.declarator: ACTION_PLACEHOLDER = "action"
focal_class.modifier: private static final
focal_class.original_string: private static final String ACTION_PLACEHOLDER = "action";
focal_class.type: String
focal_class.var_name: ACTION_PLACEHOLDER
focal_class.declarator: SUBJECT_PLACEHOLDER = "subject"
focal_class.modifier: private static final
focal_class.original_string: private static final String SUBJECT_PLACEHOLDER = "subject";
focal_class.type: String
focal_class.var_name: SUBJECT_PLACEHOLDER
focal_class.declarator: ACTION_OR_SUBJECT_PLACEHOLDER = "action-subject"
focal_class.modifier: private static final
focal_class.original_string: private static final String ACTION_OR_SUBJECT_PLACEHOLDER = "action-subject";
focal_class.type: String
focal_class.var_name: ACTION_OR_SUBJECT_PLACEHOLDER
focal_class.declarator: SUPPORTED = Collections.unmodifiableList(
              Arrays.asList(FULL_PLACEHOLDER, NAMESPACE_PLACEHOLDER, ENTITYID_PLACEHOLDER, GROUP_PLACEHOLDER,
                      CHANNEL_PLACEHOLDER, CRITERION_PLACEHOLDER, ACTION_PLACEHOLDER, SUBJECT_PLACEHOLDER,
                      ACTION_OR_SUBJECT_PLACEHOLDER))
focal_class.modifier: private static final
focal_class.original_string: private static final List<String> SUPPORTED = Collections.unmodifiableList(
              Arrays.asList(FULL_PLACEHOLDER, NAMESPACE_PLACEHOLDER, ENTITYID_PLACEHOLDER, GROUP_PLACEHOLDER,
                      CHANNEL_PLACEHOLDER, CRITERION_PLACEHOLDER, ACTION_PLACEHOLDER, SUBJECT_PLACEHOLDER,
                      ACTION_OR_SUBJECT_PLACEHOLDER));
focal_class.type: List<String>
focal_class.var_name: SUPPORTED
focal_class.file: model/placeholders/src/main/java/org/eclipse/ditto/model/placeholders/ImmutableTopicPathPlaceholder.java
focal_class.identifier: ImmutableTopicPathPlaceholder
focal_class.interfaces: implements TopicPathPlaceholder
focal_class.class_method_signature: ImmutableTopicPathPlaceholder.ImmutableTopicPathPlaceholder()
focal_class.full_signature: private  ImmutableTopicPathPlaceholder()
focal_class.identifier: ImmutableTopicPathPlaceholder
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  ImmutableTopicPathPlaceholder()
focal_class.class_method_signature: ImmutableTopicPathPlaceholder.getPrefix()
focal_class.full_signature: @Override public String getPrefix()
focal_class.identifier: getPrefix
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getPrefix()
focal_class.class_method_signature: ImmutableTopicPathPlaceholder.getSupportedNames()
focal_class.full_signature: @Override public List<String> getSupportedNames()
focal_class.identifier: getSupportedNames
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<String>
focal_class.signature: List<String> getSupportedNames()
focal_class.class_method_signature: ImmutableTopicPathPlaceholder.supports(final String name)
focal_class.full_signature: @Override public boolean supports(final String name)
focal_class.identifier: supports
focal_class.modifiers: @Override public
focal_class.parameters: (final String name)
focal_class.return: boolean
focal_class.signature: boolean supports(final String name)
focal_class.class_method_signature: ImmutableTopicPathPlaceholder.resolve(final TopicPath topicPath, final String placeholder)
focal_class.full_signature: @Override public Optional<String> resolve(final TopicPath topicPath, final String placeholder)
focal_class.identifier: resolve
focal_class.modifiers: @Override public
focal_class.parameters: (final TopicPath topicPath, final String placeholder)
focal_class.return: Optional<String>
focal_class.signature: Optional<String> resolve(final TopicPath topicPath, final String placeholder)
focal_class.class_method_signature: ImmutableTopicPathPlaceholder.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_method.body: @Override
      public Optional<String> resolve(final TopicPath topicPath, final String placeholder) {
          ConditionChecker.argumentNotEmpty(placeholder, "placeholder");
          switch (placeholder) {
              case NAMESPACE_PLACEHOLDER:
                  return Optional.of(topicPath.getNamespace());
              case ENTITYID_PLACEHOLDER:
                  return Optional.of(topicPath.getId());
              case GROUP_PLACEHOLDER:
                  return Optional.of(topicPath.getGroup().getName());
              case CHANNEL_PLACEHOLDER:
                  return Optional.of(topicPath.getChannel().getName());
              case CRITERION_PLACEHOLDER:
                  return Optional.of(topicPath.getCriterion().getName());
              case ACTION_PLACEHOLDER:
                  return topicPath.getAction().map(TopicPath.Action::getName);
              case SUBJECT_PLACEHOLDER:
                  return topicPath.getSubject();
              case ACTION_OR_SUBJECT_PLACEHOLDER:
                  // treat action-subject as synonyms:
                  return Optional.ofNullable(
                          topicPath.getSubject()
                                  .orElseGet(() ->
                                          topicPath.getAction().map(TopicPath.Action::getName).orElse(null)
                                  )
                  );
              case FULL_PLACEHOLDER:
                  return Optional.of(topicPath.getPath());
              default:
                  return Optional.empty();
          }
      }
focal_method.class_method_signature: ImmutableTopicPathPlaceholder.resolve(final TopicPath topicPath, final String placeholder)
focal_method.full_signature: @Override public Optional<String> resolve(final TopicPath topicPath, final String placeholder)
focal_method.identifier: resolve
focal_method.invocations: argumentNotEmpty of getNamespace of getId of getName getGroup of getName getChannel of getName getCriterion map getAction getSubject ofNullable orElseGet getSubject orElse map getAction of getPath empty
focal_method.modifiers: @Override public
focal_method.parameters: (final TopicPath topicPath, final String placeholder)
focal_method.return: Optional<String>
focal_method.signature: Optional<String> resolve(final TopicPath topicPath, final String placeholder)