test_class.declarator: tcs = new TestCredentialsSupport()
test_class.modifier: private final
test_class.original_string: private final TestCredentialsSupport tcs = new TestCredentialsSupport();
test_class.type: TestCredentialsSupport
test_class.var_name: tcs
test_class.declarator: credentialsSupport = CompositeCredentialsSupport
              .newInstance(() -> newHashSet(SimpleCredentialsSupport.getInstance(), tcs))
test_class.modifier: private final
test_class.original_string: private final CredentialsSupport credentialsSupport = CompositeCredentialsSupport
              .newInstance(() -> newHashSet(SimpleCredentialsSupport.getInstance(), tcs));
test_class.type: CredentialsSupport
test_class.var_name: credentialsSupport
test_class.file: oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/credentials/CompositeCredentialsSupportTest.java
test_class.identifier: CompositeCredentialsSupportTest
test_case.body: @Test
      public void testGetAttributes() {
          Map<String, ?> attributes = credentialsSupport.getAttributes(new TestCredentials());
          assertNotNull(attributes);
          assertTrue(attributes.isEmpty());
  
          SimpleCredentials sc = new SimpleCredentials("uid", new char[0]);
          attributes = credentialsSupport.getAttributes(sc);
          assertNotNull(attributes);
          assertTrue(attributes.isEmpty());
  
          Map<String, ?> expected = ImmutableMap.of("a", "a", "b", Boolean.TRUE, "c", new TestCredentials());
          for (Map.Entry<String, ?> entry : expected.entrySet()) {
              sc.setAttribute(entry.getKey(), entry.getValue());
          }
  
          attributes = credentialsSupport.getAttributes(sc);
          assertNotNull(attributes);
          assertEquals(3, attributes.size());
          assertEquals(expected, attributes);
      }
test_case.class_method_signature: CompositeCredentialsSupportTest.testGetAttributes()
test_case.full_signature: @Test public void testGetAttributes()
test_case.identifier: testGetAttributes
test_case.invocations: getAttributes assertNotNull assertTrue isEmpty getAttributes assertNotNull assertTrue isEmpty of entrySet setAttribute getKey getValue getAttributes assertNotNull assertEquals size assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetAttributes()
focal_class.declarator: credentialSupplier
focal_class.modifier: @NotNull
      private final
focal_class.original_string: @NotNull
      private final Supplier<Collection<CredentialsSupport>> credentialSupplier;
focal_class.type: Supplier<Collection<CredentialsSupport>>
focal_class.var_name: credentialSupplier
focal_class.file: oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/credentials/CompositeCredentialsSupport.java
focal_class.identifier: CompositeCredentialsSupport
focal_class.interfaces: implements CredentialsSupport
focal_class.class_method_signature: CompositeCredentialsSupport.CompositeCredentialsSupport(@NotNull Supplier<Collection<CredentialsSupport>> credentialSupplier)
focal_class.full_signature: private  CompositeCredentialsSupport(@NotNull Supplier<Collection<CredentialsSupport>> credentialSupplier)
focal_class.identifier: CompositeCredentialsSupport
focal_class.modifiers: private
focal_class.parameters: (@NotNull Supplier<Collection<CredentialsSupport>> credentialSupplier)
focal_class.signature:  CompositeCredentialsSupport(@NotNull Supplier<Collection<CredentialsSupport>> credentialSupplier)
focal_class.class_method_signature: CompositeCredentialsSupport.newInstance(@NotNull Supplier<Collection<CredentialsSupport>> credentialSupplier)
focal_class.full_signature: public static CredentialsSupport newInstance(@NotNull Supplier<Collection<CredentialsSupport>> credentialSupplier)
focal_class.identifier: newInstance
focal_class.modifiers: public static
focal_class.parameters: (@NotNull Supplier<Collection<CredentialsSupport>> credentialSupplier)
focal_class.return: CredentialsSupport
focal_class.signature: CredentialsSupport newInstance(@NotNull Supplier<Collection<CredentialsSupport>> credentialSupplier)
focal_class.class_method_signature: CompositeCredentialsSupport.getCredentialClasses()
focal_class.full_signature: @Override @NotNull public Set<Class> getCredentialClasses()
focal_class.identifier: getCredentialClasses
focal_class.modifiers: @Override @NotNull public
focal_class.parameters: ()
focal_class.return: Set<Class>
focal_class.signature: Set<Class> getCredentialClasses()
focal_class.class_method_signature: CompositeCredentialsSupport.getUserId(@NotNull Credentials credentials)
focal_class.full_signature: @Override @Nullable public String getUserId(@NotNull Credentials credentials)
focal_class.identifier: getUserId
focal_class.modifiers: @Override @Nullable public
focal_class.parameters: (@NotNull Credentials credentials)
focal_class.return: String
focal_class.signature: String getUserId(@NotNull Credentials credentials)
focal_class.class_method_signature: CompositeCredentialsSupport.getAttributes(@NotNull Credentials credentials)
focal_class.full_signature: @Override @NotNull public Map<String, ?> getAttributes(@NotNull Credentials credentials)
focal_class.identifier: getAttributes
focal_class.modifiers: @Override @NotNull public
focal_class.parameters: (@NotNull Credentials credentials)
focal_class.return: Map<String, ?>
focal_class.signature: Map<String, ?> getAttributes(@NotNull Credentials credentials)
focal_class.class_method_signature: CompositeCredentialsSupport.setAttributes(@NotNull Credentials credentials, @NotNull Map<String, ?> attributes)
focal_class.full_signature: @Override public boolean setAttributes(@NotNull Credentials credentials, @NotNull Map<String, ?> attributes)
focal_class.identifier: setAttributes
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull Credentials credentials, @NotNull Map<String, ?> attributes)
focal_class.return: boolean
focal_class.signature: boolean setAttributes(@NotNull Credentials credentials, @NotNull Map<String, ?> attributes)
focal_method.body: @Override
      @NotNull
      public Map<String, ?> getAttributes(@NotNull Credentials credentials) {
          Collection<CredentialsSupport> all = this.credentialSupplier.get();
          if (all.isEmpty()) {
              return ImmutableMap.of();
          } else if (all.size() == 1) {
              return all.iterator().next().getAttributes(credentials);
          } else {
              Map<String, Object> attrs = newHashMap();
              for (CredentialsSupport c : all) {
                  attrs.putAll(c.getAttributes(credentials));
              }
              return attrs;
          }
      }
focal_method.class_method_signature: CompositeCredentialsSupport.getAttributes(@NotNull Credentials credentials)
focal_method.full_signature: @Override @NotNull public Map<String, ?> getAttributes(@NotNull Credentials credentials)
focal_method.identifier: getAttributes
focal_method.invocations: get isEmpty of size getAttributes next iterator newHashMap putAll getAttributes
focal_method.modifiers: @Override @NotNull public
focal_method.parameters: (@NotNull Credentials credentials)
focal_method.return: Map<String, ?>
focal_method.signature: Map<String, ?> getAttributes(@NotNull Credentials credentials)